Class LinuxBuildImage
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codebuild.LinuxBuildImage
- All Implemented Interfaces:
IBuildImage
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.822Z")
@Stability(Stable)
public class LinuxBuildImage
extends software.amazon.jsii.JsiiObject
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:
- LinuxBuildImage.fromDockerRegistry(image[, { secretsManagerCredentials }])
- LinuxBuildImage.fromEcrRepository(repo[, tag])
- LinuxBuildImage.fromAsset(parent, id, props)
Example:
CodePipeline pipeline = CodePipeline.Builder.create(this, "Pipeline") .synth(ShellStep.Builder.create("Synth") .input(CodePipelineSource.connection("my-org/my-app", "main", ConnectionSourceOptions.builder() .connectionArn("arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41") .build())) .commands(List.of("npm ci", "npm run build", "npx cdk synth")) .build()) // Turn this on because the pipeline uses Docker image assets .dockerEnabledForSelfMutation(true) .build(); pipeline.addWave("MyWave", WaveOptions.builder() .post(List.of( CodeBuildStep.Builder.create("RunApproval") .commands(List.of("command-from-image")) .buildEnvironment(BuildEnvironment.builder() // The user of a Docker image asset in the pipeline requires turning on // 'dockerEnabledForSelfMutation'. .buildImage(LinuxBuildImage.fromAsset(this, "Image", DockerImageAssetProps.builder() .directory("./docker-image") .build())) .build()) .build())) .build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.codebuild.IBuildImage
IBuildImage.Jsii$Default, IBuildImage.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IBuildImage
static final IBuildImage
static final IBuildImage
The Amazon Linux 2 x86_64 standard image, version3.0
.static final IBuildImage
Deprecated.Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0 instead.static final IBuildImage
Deprecated.Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0 instead.static final IBuildImage
static final IBuildImage
static final IBuildImage
static final IBuildImage
Theaws/codebuild/standard:4.0
build image.static final IBuildImage
Theaws/codebuild/standard:5.0
build image.static final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions sectionstatic final IBuildImage
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
Constructor Summary
ModifierConstructorDescriptionprotected
LinuxBuildImage
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
LinuxBuildImage
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic IBuildImage
fromAsset
(software.constructs.Construct scope, String id, DockerImageAssetProps props) Uses an Docker image asset as a x86-64 Linux build image.static IBuildImage
Uses a Docker image provided by CodeBuild.static IBuildImage
fromDockerRegistry
(String name) static IBuildImage
fromDockerRegistry
(String name, DockerImageOptions options) static IBuildImage
fromEcrRepository
(IRepository repository) static IBuildImage
fromEcrRepository
(IRepository repository, String tagOrDigest) The defaultComputeType
to use with this image, if one was not specified inBuildEnvironment#computeType
explicitly.The Docker image identifier that the build environment uses.The type of principal that CodeBuild will use to pull this build Docker image.An optional ECR repository that the image is hosted in.The secretsManagerCredentials for access to a private registry.getType()
The type of build environment.runScriptBuildspec
(String entrypoint) Make a buildspec to run the indicated script.Allows the image a chance to validate whether the passed configuration is correct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
AMAZON_LINUX_2
-
AMAZON_LINUX_2_2
-
AMAZON_LINUX_2_3
The Amazon Linux 2 x86_64 standard image, version3.0
. -
AMAZON_LINUX_2_ARM
Deprecated.Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0 instead. -
AMAZON_LINUX_2_ARM_2
Deprecated.Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0 instead.(deprecated) Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0". -
STANDARD_1_0
-
STANDARD_2_0
-
STANDARD_3_0
-
STANDARD_4_0
Theaws/codebuild/standard:4.0
build image. -
STANDARD_5_0
Theaws/codebuild/standard:5.0
build image. -
UBUNTU_14_04_ANDROID_JAVA8_24_4_1
@Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_ANDROID_JAVA8_24_4_1Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_ANDROID_JAVA8_26_1_1
@Stability(Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_ANDROID_JAVA8_26_1_1Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_BASE
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_DOCKER_17_09_0
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_DOCKER_18_09_0
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_DOTNET_CORE_1_1
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_DOTNET_CORE_2_0
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_DOTNET_CORE_2_1
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_GOLANG_1_10
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_GOLANG_1_11
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_NODEJS_10_1_0
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_NODEJS_10_14_1
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_NODEJS_6_3_1
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_NODEJS_8_11_0
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_OPEN_JDK_11
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_OPEN_JDK_8
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_OPEN_JDK_9
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PHP_5_6
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PHP_7_0
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PHP_7_1
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PYTHON_2_7_12
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PYTHON_3_3_6
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PYTHON_3_4_5
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PYTHON_3_5_2
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PYTHON_3_6_5
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_PYTHON_3_7_1
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_RUBY_2_2_5
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_RUBY_2_3_1
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_RUBY_2_5_1
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section -
UBUNTU_14_04_RUBY_2_5_3
Deprecated.UseSTANDARD_2_0
and specify runtime in buildspec runtime-versions section
-
-
Constructor Details
-
LinuxBuildImage
protected LinuxBuildImage(software.amazon.jsii.JsiiObjectRef objRef) -
LinuxBuildImage
protected LinuxBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromAsset
@Stability(Stable) @NotNull public static IBuildImage fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DockerImageAssetProps props) Uses an Docker image asset as a x86-64 Linux build image.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
fromCodeBuildImageId
Uses a Docker image provided by CodeBuild.Example:
"aws/codebuild/standard:4.0";
- Parameters:
id
- The image identifier. This parameter is required.- Returns:
- A Docker image provided by CodeBuild.
- See Also:
-
fromDockerRegistry
@Stability(Stable) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name, @Nullable DockerImageOptions options) - Parameters:
name
- This parameter is required.options
-- Returns:
- a x86-64 Linux build image from a Docker Hub image.
-
fromDockerRegistry
- Parameters:
name
- This parameter is required.- Returns:
- a x86-64 Linux build image from a Docker Hub image.
-
fromEcrRepository
@Stability(Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository, @Nullable String tagOrDigest) - Parameters:
repository
- The ECR repository. This parameter is required.tagOrDigest
- Image tag or digest (default "latest", digests must start withsha256:
).- Returns:
- A x86-64 Linux build image from an ECR repository.
NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image.
- See Also:
-
fromEcrRepository
@Stability(Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository) - Parameters:
repository
- The ECR repository. This parameter is required.- Returns:
- A x86-64 Linux build image from an ECR repository.
NOTE: if the repository is external (i.e. imported), then we won't be able to add a resource policy statement for it so CodeBuild can pull the image.
- See Also:
-
runScriptBuildspec
Make a buildspec to run the indicated script.- Specified by:
runScriptBuildspec
in interfaceIBuildImage
- Parameters:
entrypoint
- This parameter is required.
-
validate
Allows the image a chance to validate whether the passed configuration is correct.- Specified by:
validate
in interfaceIBuildImage
- Parameters:
_
- This parameter is required.
-
getDefaultComputeType
The defaultComputeType
to use with this image, if one was not specified inBuildEnvironment#computeType
explicitly.- Specified by:
getDefaultComputeType
in interfaceIBuildImage
-
getImageId
The Docker image identifier that the build environment uses.- Specified by:
getImageId
in interfaceIBuildImage
- See Also:
-
getType
The type of build environment.- Specified by:
getType
in interfaceIBuildImage
-
getImagePullPrincipalType
The type of principal that CodeBuild will use to pull this build Docker image.- Specified by:
getImagePullPrincipalType
in interfaceIBuildImage
-
getRepository
An optional ECR repository that the image is hosted in.- Specified by:
getRepository
in interfaceIBuildImage
-
getSecretsManagerCredentials
The secretsManagerCredentials for access to a private registry.- Specified by:
getSecretsManagerCredentials
in interfaceIBuildImage
-