Interface BuildEnvironment
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BuildEnvironment.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:41.668Z")
@Stability(Stable)
public interface BuildEnvironment
extends software.amazon.jsii.JsiiSerializable
Example:
Vpc vpc; SecurityGroup mySecurityGroup; CodePipeline.Builder.create(this, "Pipeline") // Standard CodePipeline properties .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()) // Defaults for all CodeBuild projects .codeBuildDefaults(CodeBuildOptions.builder() // Prepend commands and configuration to all projects .partialBuildSpec(BuildSpec.fromObject(Map.of( "version", "0.2"))) // Control the build environment .buildEnvironment(BuildEnvironment.builder() .computeType(ComputeType.LARGE) .build()) // Control Elastic Network Interface creation .vpc(vpc) .subnetSelection(SubnetSelection.builder().subnetType(SubnetType.PRIVATE_WITH_NAT).build()) .securityGroups(List.of(mySecurityGroup)) // Additional policy statements for the execution role .rolePolicy(List.of( PolicyStatement.Builder.create().build())) .build()) .synthCodeBuildDefaults(CodeBuildOptions.builder().build()) .assetPublishingCodeBuildDefaults(CodeBuildOptions.builder().build()) .selfMutationCodeBuildDefaults(CodeBuildOptions.builder().build()) .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forBuildEnvironment
static final class
An implementation forBuildEnvironment
-
Method Summary
Modifier and TypeMethodDescriptionstatic BuildEnvironment.Builder
builder()
default IBuildImage
The image used for the builds.default BuildEnvironmentCertificate
The location of the PEM-encoded certificate for the build project.default ComputeType
The type of compute to use for this build.default Map<String,
BuildEnvironmentVariable> The environment variables that your builds can use.default Boolean
Indicates how the project builds Docker images.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBuildImage
The image used for the builds.Default: LinuxBuildImage.STANDARD_1_0
-
getCertificate
The location of the PEM-encoded certificate for the build project.Default: - No external certificate is added to the project
-
getComputeType
The type of compute to use for this build.See the
ComputeType
enum for the possible values.Default: taken from {@link #buildImage#defaultComputeType}
-
getEnvironmentVariables
The environment variables that your builds can use. -
getPrivileged
Indicates how the project builds Docker images.Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail.
Default: false
-
builder
- Returns:
- a
BuildEnvironment.Builder
ofBuildEnvironment
-