S3ArtifactsProps Struct
Construction properties for S3Artifacts.
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
The name of the output bucket.
encryptionbooleanencryptionboolencryptionBooleanEncryptionboolEncryption*bool= true - output will be encrypted#If this is false, build output will not be encrypted.
This is useful if the artifact to publish a static website or sharing content with others
The artifact identifier.
This property is required on secondary artifacts.
includeBuildIdbooleaninclude_build_idboolincludeBuildIdBooleanIncludeBuildIdboolIncludeBuildId*bool= true#Indicates if the build ID should be included in the path.
If this is set to true, then the build artifact will be stored in "<path>/<build-id>/<name>".
The name of the build output ZIP file or folder inside the bucket.
The full S3 object key will be "<path>/<build-id>/<name>" or "<path>/<name>" depending on whether includeBuildId is set to true.
If not set, overrideArtifactName will be set and the name from the buildspec will be used instead.
default
Default: undefined, and use the name from the buildspec
packageZipbooleanpackage_zipboolpackageZipBooleanPackageZipboolPackageZip*bool= true - files will be archived#If this is true, all build output will be packaged into a single .zip file. Otherwise, all files will be uploaded to <path>/<name>.
The path inside of the bucket for the build output .zip file or folder. If a value is not specified, then build output will be stored at the root of the bucket (or under the <build-id> directory if `includeBuildId` is set to true).