interface IBuildImage
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodeBuild.IBuildImage |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#IBuildImage |
Java | software.amazon.awscdk.services.codebuild.IBuildImage |
Python | aws_cdk.aws_codebuild.IBuildImage |
TypeScript (source) | aws-cdk-lib » aws_codebuild » IBuildImage |
Implemented by
Linux
, Linux
, Linux
, Linux
, Linux
, Mac
, Windows
Obtainable from
Linux
.fromCodeBuildImageId()
, Linux
.fromDockerRegistry()
, Linux
.fromEcrRepository()
, Linux
.fromAsset()
, Linux
.fromCodeBuildImageId()
, Linux
.fromDockerRegistry()
, Linux
.fromEcrRepository()
, Linux
.awsDeepLearningContainersImage()
, Linux
.fromEcrRepository()
, Mac
.fromAsset()
, Mac
.fromDockerRegistry()
, Mac
.fromEcrRepository()
, Windows
.fromAsset()
, Windows
.fromDockerRegistry()
, Windows
.fromEcrRepository()
Represents a Docker image used for the CodeBuild Project builds.
Use the concrete subclasses, either:
LinuxBuildImage
or WindowsBuildImage
.
Properties
Name | Type | Description |
---|---|---|
default | Compute | The default ComputeType to use with this image, if one was not specified in 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 ComputeType
to use with this image, if one was not specified in BuildEnvironment#computeType
explicitly.
imageId
Type:
string
The Docker image identifier that the build environment uses.
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
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.