interface IBuildImage
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodeBuild.IBuildImage |
Java | software.amazon.awscdk.services.codebuild.IBuildImage |
Python | aws_cdk.aws_codebuild.IBuildImage |
TypeScript (source) | @aws-cdk/aws-codebuild » IBuildImage |
Implemented by
Linux
, Linux
, Linux
, Windows
Obtainable from
Linux
.fromCodeBuildImageId()
, Linux
.fromEcrRepository()
, Linux
.fromAsset()
, Linux
.fromCodeBuildImageId()
, Linux
.fromDockerRegistry()
, Linux
.fromEcrRepository()
, Linux
.awsDeepLearningContainersImage()
, Linux
.fromEcrRepository()
, Windows
.fromAsset()
, Windows
.fromDockerRegistry()
, Windows
.fromEcrRepository()
Represents a Docker image used for the CodeBuild Project builds.
Use the concrete subclasses, either: {@link LinuxBuildImage} or {@link WindowsBuildImage}.
Properties
Name | Type | Description |
---|---|---|
default | Compute | The default {@link ComputeType} to use with this image, if one was not specified in {@link BuildEnvironment#computeType} explicitly. |
image | string | The Docker image identifier that the build environment uses. |
type | string | The type of build environment. |
image | Image | The type of principal that CodeBuild will use to pull this build Docker image. |
repository? | IRepository | An optional ECR repository that the image is hosted in. |
secrets | ISecret | The secretsManagerCredentials for access to a private registry. |
defaultComputeType
Type:
Compute
The default {@link ComputeType} to use with this image, if one was not specified in {@link BuildEnvironment#computeType} explicitly.
imageId
Type:
string
The Docker image identifier that the build environment uses.
type
Type:
string
The type of build environment.
imagePullPrincipalType?
Type:
Image
(optional, default: ImagePullPrincipalType.SERVICE_ROLE)
The type of principal that CodeBuild will use to pull this build Docker image.
repository?
Type:
IRepository
(optional, default: no repository)
An optional ECR repository that the image is hosted in.
secretsManagerCredentials?
Type:
ISecret
(optional, default: no credentials will be used)
The secretsManagerCredentials for access to a private registry.
Methods
Name | Description |
---|---|
run | Make a buildspec to run the indicated script. |
validate(buildEnvironment) | Allows the image a chance to validate whether the passed configuration is correct. |
runScriptBuildspec(entrypoint)
public runScriptBuildspec(entrypoint: string): BuildSpec
Parameters
- entrypoint
string
Returns
Make a buildspec to run the indicated script.
validate(buildEnvironment)
public validate(buildEnvironment: BuildEnvironment): string[]
Parameters
- buildEnvironment
Build
— the current build environment.Environment
Returns
string[]
Allows the image a chance to validate whether the passed configuration is correct.