@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:47:02.639Z") @Stability(value=Experimental) public class LinuxBuildImage extends software.amazon.jsii.JsiiObject implements IBuildImage
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:
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());
software.amazon.jsii.JsiiObject.InitializationModeIBuildImage.Jsii$Default, IBuildImage.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static IBuildImage |
AMAZON_LINUX_2 |
static IBuildImage |
AMAZON_LINUX_2_2 |
static IBuildImage |
AMAZON_LINUX_2_3
(experimental) The Amazon Linux 2 x86_64 standard image, version `3.0`.
|
static IBuildImage |
AMAZON_LINUX_2_ARM
Deprecated.
Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0 instead.
|
static IBuildImage |
AMAZON_LINUX_2_ARM_2
Deprecated.
Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0 instead.
|
static IBuildImage |
STANDARD_1_0 |
static IBuildImage |
STANDARD_2_0 |
static IBuildImage |
STANDARD_3_0 |
static IBuildImage |
STANDARD_4_0
(experimental) The `aws/codebuild/standard:4.0` build image.
|
static IBuildImage |
STANDARD_5_0
(experimental) The `aws/codebuild/standard:5.0` build image.
|
static IBuildImage |
UBUNTU_14_04_ANDROID_JAVA8_24_4_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_ANDROID_JAVA8_26_1_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_BASE
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_DOCKER_17_09_0
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_DOCKER_18_09_0
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_DOTNET_CORE_1_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_DOTNET_CORE_2_0
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_DOTNET_CORE_2_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_GOLANG_1_10
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_GOLANG_1_11
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_NODEJS_10_1_0
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_NODEJS_10_14_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_NODEJS_6_3_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_NODEJS_8_11_0
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_OPEN_JDK_11
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_OPEN_JDK_8
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_OPEN_JDK_9
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PHP_5_6
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PHP_7_0
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PHP_7_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PYTHON_2_7_12
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PYTHON_3_3_6
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PYTHON_3_4_5
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PYTHON_3_5_2
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PYTHON_3_6_5
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_PYTHON_3_7_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_RUBY_2_2_5
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_RUBY_2_3_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_RUBY_2_5_1
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
static IBuildImage |
UBUNTU_14_04_RUBY_2_5_3
Deprecated.
Use
STANDARD_2_0 and specify runtime in buildspec runtime-versions section |
| Modifier | Constructor and Description |
|---|---|
protected |
LinuxBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LinuxBuildImage(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IBuildImage |
fromAsset(software.constructs.Construct scope,
String id,
DockerImageAssetProps props)
(experimental) Uses an Docker image asset as a x86-64 Linux build image.
|
static IBuildImage |
fromCodeBuildImageId(String id)
(experimental) 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) |
ComputeType |
getDefaultComputeType()
(experimental) The default
ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly. |
String |
getImageId()
(experimental) The Docker image identifier that the build environment uses.
|
ImagePullPrincipalType |
getImagePullPrincipalType()
(experimental) The type of principal that CodeBuild will use to pull this build Docker image.
|
IRepository |
getRepository()
(experimental) An optional ECR repository that the image is hosted in.
|
ISecret |
getSecretsManagerCredentials()
(experimental) The secretsManagerCredentials for access to a private registry.
|
String |
getType()
(experimental) The type of build environment.
|
BuildSpec |
runScriptBuildspec(String entrypoint)
(experimental) Make a buildspec to run the indicated script.
|
List<String> |
validate(BuildEnvironment _)
(experimental) Allows the image a chance to validate whether the passed configuration is correct.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Experimental) public static final IBuildImage AMAZON_LINUX_2
@Stability(value=Experimental) public static final IBuildImage AMAZON_LINUX_2_2
@Stability(value=Experimental) public static final IBuildImage AMAZON_LINUX_2_3
@Stability(value=Deprecated) @Deprecated public static final IBuildImage AMAZON_LINUX_2_ARM
@Stability(value=Deprecated) @Deprecated public static final IBuildImage AMAZON_LINUX_2_ARM_2
@Stability(value=Experimental) public static final IBuildImage STANDARD_1_0
@Stability(value=Experimental) public static final IBuildImage STANDARD_2_0
@Stability(value=Experimental) public static final IBuildImage STANDARD_3_0
@Stability(value=Experimental) public static final IBuildImage STANDARD_4_0
@Stability(value=Experimental) public static final IBuildImage STANDARD_5_0
@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_ANDROID_JAVA8_24_4_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_ANDROID_JAVA8_26_1_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_BASE
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOCKER_17_09_0
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOCKER_18_09_0
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOTNET_CORE_1_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOTNET_CORE_2_0
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_DOTNET_CORE_2_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_GOLANG_1_10
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_GOLANG_1_11
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_NODEJS_10_1_0
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_NODEJS_10_14_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_NODEJS_6_3_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_NODEJS_8_11_0
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_OPEN_JDK_11
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_OPEN_JDK_8
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_OPEN_JDK_9
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PHP_5_6
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PHP_7_0
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PHP_7_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_2_7_12
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_3_6
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_4_5
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_5_2
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_6_5
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_PYTHON_3_7_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_RUBY_2_2_5
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_RUBY_2_3_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_RUBY_2_5_1
STANDARD_2_0 and specify runtime in buildspec runtime-versions section@Stability(value=Deprecated) @Deprecated public static final IBuildImage UBUNTU_14_04_RUBY_2_5_3
STANDARD_2_0 and specify runtime in buildspec runtime-versions sectionprotected LinuxBuildImage(software.amazon.jsii.JsiiObjectRef objRef)
protected LinuxBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) @NotNull public static IBuildImage fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DockerImageAssetProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static IBuildImage fromCodeBuildImageId(@NotNull String id)
Example:
"aws/codebuild/standard:4.0";
id - The image identifier. This parameter is required.@Stability(value=Experimental) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name, @Nullable DockerImageOptions options)
name - This parameter is required.options - @Stability(value=Experimental) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name)
name - This parameter is required.@Stability(value=Experimental) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository, @Nullable String tagOrDigest)
repository - The ECR repository. This parameter is required.tagOrDigest - Image tag or digest (default "latest", digests must start with `sha256:`).@Stability(value=Experimental) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository)
repository - The ECR repository. This parameter is required.@Stability(value=Experimental) @NotNull public BuildSpec runScriptBuildspec(@NotNull String entrypoint)
runScriptBuildspec in interface IBuildImageentrypoint - This parameter is required.@Stability(value=Experimental) @NotNull public List<String> validate(@NotNull BuildEnvironment _)
validate in interface IBuildImage_ - This parameter is required.@Stability(value=Experimental) @NotNull public ComputeType getDefaultComputeType()
ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly.getDefaultComputeType in interface IBuildImage@Stability(value=Experimental) @NotNull public String getImageId()
getImageId in interface IBuildImage@Stability(value=Experimental) @NotNull public String getType()
getType in interface IBuildImage@Stability(value=Experimental) @Nullable public ImagePullPrincipalType getImagePullPrincipalType()
getImagePullPrincipalType in interface IBuildImage@Stability(value=Experimental) @Nullable public IRepository getRepository()
getRepository in interface IBuildImage@Stability(value=Experimental) @Nullable public ISecret getSecretsManagerCredentials()
getSecretsManagerCredentials in interface IBuildImageCopyright © 2022. All rights reserved.