Interface BuildEnvironment
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
BuildEnvironment.Jsii$Proxy
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 ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forBuildEnvironmentstatic final classAn implementation forBuildEnvironment -
Method Summary
Modifier and TypeMethodDescriptionstatic BuildEnvironment.Builderbuilder()default IBuildImageThe image used for the builds.default BuildEnvironmentCertificateThe location of the PEM-encoded certificate for the build project.default ComputeTypeThe type of compute to use for this build.default DockerServerOptionsThe Docker server configuration CodeBuild use to build your Docker image.default Map<String, BuildEnvironmentVariable> The environment variables that your builds can use.default IFleetgetFleet()Fleet resource for a reserved capacity CodeBuild project.default BooleanIndicates 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_7_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
ComputeTypeenum for the possible values.Default: taken from `#buildImage#defaultComputeType`
-
getDockerServer
The Docker server configuration CodeBuild use to build your Docker image.Default: - Doesn't use remote docker server
-
getEnvironmentVariables
The environment variables that your builds can use. -
getFleet
Fleet resource for a reserved capacity CodeBuild project.Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects.
You will be charged for the resources in the fleet, even if they are idle.
Default: - No fleet will be attached to the project, which will remain on-demand.
- See Also:
-
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.BuilderofBuildEnvironment
-