Artifacts¶
-
class
aws_cdk.aws_codebuild.
Artifacts
(*, identifier=None)¶ Bases:
object
Artifacts definition for a CodeBuild Project.
- ExampleMetadata
infused
Example:
# bucket: s3.Bucket project = codebuild.Project(self, "MyProject", build_spec=codebuild.BuildSpec.from_object({ "version": "0.2" }), artifacts=codebuild.Artifacts.s3( bucket=bucket, include_build_id=False, package_zip=True, path="another/path", identifier="AddArtifact1" ) )
- Parameters
identifier (
Optional
[str
]) – The artifact identifier. This property is required on secondary artifacts.
Methods
-
bind
(_scope, _project)¶ Callback when an Artifacts class is used in a CodeBuild Project.
- Parameters
- Return type
Attributes
-
identifier
¶ The artifact identifier.
This property is required on secondary artifacts.
- Return type
Optional
[str
]
-
type
¶ The CodeBuild type of this artifact.
- Return type
str
Static Methods
-
classmethod
s3
(*, bucket, encryption=None, include_build_id=None, name=None, package_zip=None, path=None, identifier=None)¶ - Parameters
bucket (
IBucket
) – The name of the output bucket.encryption (
Optional
[bool
]) – 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 Default: true - output will be encryptedinclude_build_id (
Optional
[bool
]) – 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 “//”. Default: truename (
Optional
[str
]) – The name of the build output ZIP file or folder inside the bucket. The full S3 object key will be “//” or “/” depending on whetherincludeBuildId
is set to true. If not set,overrideArtifactName
will be set and the name from the buildspec will be used instead. Default: undefined, and use the name from the buildspecpackage_zip (
Optional
[bool
]) – If this is true, all build output will be packaged into a single .zip file. Otherwise, all files will be uploaded to /. Default: true - files will be archivedpath (
Optional
[str
]) – 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 directory ifincludeBuildId
is set to true). Default: the root of the bucketidentifier (
Optional
[str
]) – The artifact identifier. This property is required on secondary artifacts.
- Return type