Implements IBuildImage
A CodeBuild image running x86-64 Linux.
This class has a bunch of public constants that represent the most popular images.
You can also specify a custom image using one of the static methods:
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
Exampleconst pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
synth: new pipelines.ShellStep('Synth', {
input: pipelines.CodePipelineSource.connection('my-org/my-app', 'main', {
connectionArn:
'arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41',
}),
commands: ['npm ci', 'npm run build', 'npx cdk synth'],
}),
dockerEnabledForSelfMutation: true,
});
pipeline.addWave('MyWave', {
post: [
new pipelines.CodeBuildStep('RunApproval', {
commands: ['command-from-image'],
buildEnvironment: {
buildImage: codebuild.LinuxBuildImage.fromAsset(this, 'Image', {
directory: './docker-image',
}),
},
}),
],
});
Properties Name Type Description defaultComputeType ComputeType
The default ComputeType
to use with this image, if one was not specified in BuildEnvironment#computeType
explicitly. imageId string
The Docker image identifier that the build environment uses. type string
The type of build environment. imagePullPrincipalType? ImagePullPrincipalType
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. secretsManagerCredentials? ISecret
The secretsManagerCredentials for access to a private registry. static AMAZON_LINUX_2â ï¸ IBuildImage
static AMAZON_LINUX_2023_4 IBuildImage
The Amazon Linux 2023 x86_64 standard image, version 4.0
. static AMAZON_LINUX_2023_5 IBuildImage
The Amazon Linux 2023 x86_64 standard image, version 5.0
. static AMAZON_LINUX_2023_CORETTO_11 IBuildImage
The Amazon Coretto 11 image x86_64, based on Amazon Linux 2023. static AMAZON_LINUX_2023_CORETTO_8 IBuildImage
The Amazon Coretto 8 image x86_64, based on Amazon Linux 2023. static AMAZON_LINUX_2_2â ï¸ IBuildImage
static AMAZON_LINUX_2_3â ï¸ IBuildImage
The Amazon Linux 2 x86_64 standard image, version 3.0
. static AMAZON_LINUX_2_4 IBuildImage
The Amazon Linux 2 x86_64 standard image, version 4.0
. static AMAZON_LINUX_2_5 IBuildImage
The Amazon Linux 2023 x86_64 standard image, version 5.0
. static AMAZON_LINUX_2_ARMâ ï¸ IBuildImage
Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0". static AMAZON_LINUX_2_ARM_2 IBuildImage
Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0". static AMAZON_LINUX_2_ARM_3 IBuildImage
Image "aws/codebuild/amazonlinux2-aarch64-standard:3.0". static AMAZON_LINUX_2_CORETTO_11 IBuildImage
The Amazon Coretto 11 image x86_64, based on Amazon Linux 2. static AMAZON_LINUX_2_CORETTO_8 IBuildImage
The Amazon Coretto 8 image x86_64, based on Amazon Linux 2. static STANDARD_1_0â ï¸ IBuildImage
static STANDARD_2_0â ï¸ IBuildImage
static STANDARD_3_0â ï¸ IBuildImage
static STANDARD_4_0â ï¸ IBuildImage
The aws/codebuild/standard:4.0
build image. static STANDARD_5_0 IBuildImage
The aws/codebuild/standard:5.0
build image. static STANDARD_6_0 IBuildImage
The aws/codebuild/standard:6.0
build image. static STANDARD_7_0 IBuildImage
The aws/codebuild/standard:7.0
build image. defaultComputeType
Type: ComputeType
The default ComputeType
to use with this image, if one was not specified in BuildEnvironment#computeType
explicitly.
Type: string
The Docker image identifier that the build environment uses.
typeType: string
The type of build environment.
imagePullPrincipalType?Type: ImagePullPrincipalType
(optional)
The type of principal that CodeBuild will use to pull this build Docker image.
repository?Type: IRepository
(optional)
An optional ECR repository that the image is hosted in.
secretsManagerCredentials?Type: ISecret
(optional)
The secretsManagerCredentials for access to a private registry.
static AMAZON_LINUX_2â ï¸â ï¸ Deprecated: Use {@link LinuxBuildImage.AMAZON_LINUX_2_5 } instead.
Type: IBuildImage
Type: IBuildImage
The Amazon Linux 2023 x86_64 standard image, version 4.0
.
Type: IBuildImage
The Amazon Linux 2023 x86_64 standard image, version 5.0
.
Type: IBuildImage
The Amazon Coretto 11 image x86_64, based on Amazon Linux 2023.
static AMAZON_LINUX_2023_CORETTO_8Type: IBuildImage
The Amazon Coretto 8 image x86_64, based on Amazon Linux 2023.
static AMAZON_LINUX_2_2â ï¸â ï¸ Deprecated: Use {@link LinuxBuildImage.AMAZON_LINUX_2_5 } instead.
Type: IBuildImage
â ï¸ Deprecated: Use {@link LinuxBuildImage.AMAZON_LINUX_2_5 } instead.
Type: IBuildImage
The Amazon Linux 2 x86_64 standard image, version 3.0
.
Type: IBuildImage
The Amazon Linux 2 x86_64 standard image, version 4.0
.
Type: IBuildImage
The Amazon Linux 2023 x86_64 standard image, version 5.0
.
â ï¸ Deprecated: Use {@link LinuxArmBuildImage.AMAZON_LINUX_2_ARM_3 } instead.
Type: IBuildImage
Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0".
See also: {LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0}
static AMAZON_LINUX_2_ARM_2Type: IBuildImage
Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0".
See also: {LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0}
static AMAZON_LINUX_2_ARM_3Type: IBuildImage
Image "aws/codebuild/amazonlinux2-aarch64-standard:3.0".
See also: {LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0}
static AMAZON_LINUX_2_CORETTO_11Type: IBuildImage
The Amazon Coretto 11 image x86_64, based on Amazon Linux 2.
static AMAZON_LINUX_2_CORETTO_8Type: IBuildImage
The Amazon Coretto 8 image x86_64, based on Amazon Linux 2.
static STANDARD_1_0â ï¸â ï¸ Deprecated: Use {@link LinuxBuildImage.STANDARD_7_0 } instead.
Type: IBuildImage
â ï¸ Deprecated: Use {@link LinuxBuildImage.STANDARD_7_0 } instead.
Type: IBuildImage
â ï¸ Deprecated: Use {@link LinuxBuildImage.STANDARD_7_0 } instead.
Type: IBuildImage
â ï¸ Deprecated: Use {@link LinuxBuildImage.STANDARD_7_0 } instead.
Type: IBuildImage
The aws/codebuild/standard:4.0
build image.
Type: IBuildImage
The aws/codebuild/standard:5.0
build image.
Type: IBuildImage
The aws/codebuild/standard:6.0
build image.
Type: IBuildImage
The aws/codebuild/standard:7.0
build image.
public runScriptBuildspec(entrypoint: string): BuildSpec
Parameters
string
Returns
Make a buildspec to run the indicated script.
validate(env)public validate(env: BuildEnvironment): string[]
Parameters
BuildEnvironment
Returns
string[]
Allows the image a chance to validate whether the passed configuration is correct.
static fromAsset(scope, id, props)public static fromAsset(scope: Construct, id: string, props: DockerImageAssetProps): IBuildImage
Parameters
Construct
string
DockerImageAssetProps
Returns
Uses an Docker image asset as a x86-64 Linux build image.
static fromCodeBuildImageId(id)public static fromCodeBuildImageId(id: string): IBuildImage
Parameters
string
â The image identifier.Returns
Uses a Docker image provided by CodeBuild.
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html Example
'aws/codebuild/standard:4.0'
static fromDockerRegistry(name, options?)
public static fromDockerRegistry(name: string, options?: DockerImageOptions): IBuildImage
Parameters
string
DockerImageOptions
Returns
static fromEcrRepository(repository, tagOrDigest?)public static fromEcrRepository(repository: IRepository, tagOrDigest?: string): IBuildImage
Parameters
IRepository
â The ECR repository.string
â Image tag or digest (default "latest", digests must start with sha256:
).Returns
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4