aws-cdk-lib.aws_codebuild.Artifacts

class Artifacts

LanguageType name
.NETAmazon.CDK.AWS.CodeBuild.Artifacts
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#Artifacts
Javasoftware.amazon.awscdk.services.codebuild.Artifacts
Pythonaws_cdk.aws_codebuild.Artifacts
TypeScript (source)aws-cdk-lib » aws_codebuild » Artifacts

Implements IArtifacts

Artifacts definition for a CodeBuild Project.

Example

declare const bucket: s3.Bucket;

const project = new codebuild.Project(this, 'MyProject', {
  buildSpec: codebuild.BuildSpec.fromObject({
    version: '0.2',
  }),
  artifacts: codebuild.Artifacts.s3({
      bucket,
      includeBuildId: false,
      packageZip: true,
      path: 'another/path',
      identifier: 'AddArtifact1',
    }),
});

Initializer (protected)

super(props: ArtifactsProps)

Parameters

  • props ArtifactsProps

Properties

NameTypeDescription
typestringThe CodeBuild type of this artifact.
identifier?stringThe artifact identifier.

type

Type: string

The CodeBuild type of this artifact.


identifier?

Type: string (optional)

The artifact identifier.

This property is required on secondary artifacts.

Methods

NameDescription
bind(_scope, _project)Callback when an Artifacts class is used in a CodeBuild Project.
static s3(props)

bind(_scope, _project)

public bind(_scope: Construct, _project: IProject): ArtifactsConfig

Parameters

  • _scope Construct
  • _project IProject

Returns

  • ArtifactsConfig

Callback when an Artifacts class is used in a CodeBuild Project.


static s3(props)

public static s3(props: S3ArtifactsProps): IArtifacts

Parameters

  • props S3ArtifactsProps

Returns

  • IArtifacts