interface BuildEnvironment
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CodeBuild.BuildEnvironment |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#BuildEnvironment |
![]() | software.amazon.awscdk.services.codebuild.BuildEnvironment |
![]() | aws_cdk.aws_codebuild.BuildEnvironment |
![]() | aws-cdk-lib » aws_codebuild » BuildEnvironment |
Example
const 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', // Created using the AWS console * });',
}),
commands: ['npm ci', 'npm run build', 'npx cdk synth'],
}),
// Turn this on because the pipeline uses Docker image assets
dockerEnabledForSelfMutation: true,
});
pipeline.addWave('MyWave', {
post: [
new pipelines.CodeBuildStep('RunApproval', {
commands: ['command-from-image'],
buildEnvironment: {
// The user of a Docker image asset in the pipeline requires turning on
// 'dockerEnabledForSelfMutation'.
buildImage: codebuild.LinuxBuildImage.fromAsset(this, 'Image', {
directory: './docker-image',
}),
},
}),
],
});
Properties
Name | Type | Description |
---|---|---|
build | IBuild | The image used for the builds. |
certificate? | Build | The location of the PEM-encoded certificate for the build project. |
compute | Compute | The type of compute to use for this build. |
environment | { [string]: Build } | The environment variables that your builds can use. |
fleet? | IFleet | Fleet resource for a reserved capacity CodeBuild project. |
privileged? | boolean | Indicates how the project builds Docker images. |
buildImage?
Type:
IBuild
(optional, default: LinuxBuildImage.STANDARD_7_0)
The image used for the builds.
certificate?
Type:
Build
(optional, default: No external certificate is added to the project)
The location of the PEM-encoded certificate for the build project.
computeType?
Type:
Compute
(optional, default: taken from #buildImage#defaultComputeType
)
The type of compute to use for this build.
See the ComputeType
enum for the possible values.
environmentVariables?
Type:
{ [string]:
Build
}
(optional)
The environment variables that your builds can use.
fleet?
Type:
IFleet
(optional, default: No fleet will be attached to the project, which will remain on-demand.)
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.
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html
privileged?
Type:
boolean
(optional, default: false)
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.