Skip to content
v2.274.0

Artifacts Class ​

Artifacts definition for a CodeBuild Project.

Example ​

ts
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',
    }),
});

Properties ​

identifierstringidentifierstridentifierStringIdentifierstringIdentifier*string#
The artifact identifier.

This property is required on secondary artifacts.

typestringtypestrtypeStringTypestringType*stringrequired#
The CodeBuild type of this artifact.

Methods ​

bind(_scope: Construct, _project: IProject): ArtifactsConfigdef bind(self, _scope: Construct, _project: IProject) -> ArtifactsConfigpublic ArtifactsConfig bind(Construct _scope, IProject _project)public ArtifactsConfig Bind(Construct _scope, IProject _project)func Bind(_scope Construct, _project IProject) ArtifactsConfig#
Callback when an Artifacts class is used in a CodeBuild Project.
s3(props: S3ArtifactsProps): IArtifacts@staticmethod def s3(props: S3ArtifactsProps) -> IArtifactspublic static IArtifacts s3(S3ArtifactsProps props)public static IArtifacts S3(S3ArtifactsProps props)func S3(Props S3ArtifactsProps) IArtifactsstatic#