Interface CodeBuildOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CodeBuildOptions.Jsii$Proxy
Example:
IFileSetProducer source; // the repository source String[] synthCommands; // Commands to synthesize your app String[] installCommands; // Commands to install your toolchain CodePipeline pipeline = CodePipeline.Builder.create(this, "Pipeline") // Standard CodePipeline properties... .synth(ShellStep.Builder.create("Synth") .input(source) .commands(synthCommands) .build()) // Configure CodeBuild to use a drop-in Docker replacement. .codeBuildDefaults(CodeBuildOptions.builder() .partialBuildSpec(BuildSpec.fromObject(Map.of( "phases", Map.of( "install", Map.of( // Add the shell commands to install your drop-in Docker // replacement to the CodeBuild enviromment. "commands", installCommands))))) .buildEnvironment(BuildEnvironment.builder() .environmentVariables(Map.of( // Instruct the AWS CDK to use `drop-in-replacement` instead of // `docker` when building / publishing docker images. // e.g., `drop-in-replacement build . -f path/to/Dockerfile` "CDK_DOCKER", BuildEnvironmentVariable.builder().value("drop-in-replacement").build())) .build()) .build()) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCodeBuildOptions
static final class
An implementation forCodeBuildOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic CodeBuildOptions.Builder
builder()
default BuildEnvironment
Partial build environment, will be combined with other build environments that apply.default Cache
getCache()
Caching strategy to use.default List<IFileSystemLocation>
ProjectFileSystemLocation objects for CodeBuild build projects.default LoggingOptions
Information about logs for CodeBuild projects.default BuildSpec
Partial buildspec, will be combined with other buildspecs that apply.default List<PolicyStatement>
Policy statements to add to role.default List<ISecurityGroup>
Which security group(s) to associate with the project network interfaces.default SubnetSelection
Which subnets to use.default Duration
The number of minutes after which AWS CodeBuild stops the build if it's not complete.default IVpc
getVpc()
The VPC where to create the CodeBuild network interfaces in.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBuildEnvironment
Partial build environment, will be combined with other build environments that apply.Default: - Non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_7_0
-
getCache
Caching strategy to use.Default: - No cache
-
getFileSystemLocations
ProjectFileSystemLocation objects for CodeBuild build projects.A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, and type of a file system created using Amazon Elastic File System. Requires a vpc to be set and privileged to be set to true.
Default: - no file system locations
-
getLogging
Information about logs for CodeBuild projects.A CodeBuild project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.
Default: - no log configuration is set
-
getPartialBuildSpec
Partial buildspec, will be combined with other buildspecs that apply.The BuildSpec must be available inline--it cannot reference a file on disk.
Default: - No initial BuildSpec
-
getRolePolicy
Policy statements to add to role.Default: - No policy statements added to CodeBuild Project Role
-
getSecurityGroups
Which security group(s) to associate with the project network interfaces.Only used if 'vpc' is supplied.
Default: - Security group will be automatically created.
-
getSubnetSelection
Which subnets to use.Only used if 'vpc' is supplied.
Default: - All private subnets.
-
getTimeout
The number of minutes after which AWS CodeBuild stops the build if it's not complete.For valid values, see the timeoutInMinutes field in the AWS CodeBuild User Guide.
Default: Duration.hours(1)
-
getVpc
The VPC where to create the CodeBuild network interfaces in.Default: - No VPC
-
builder
- Returns:
- a
CodeBuildOptions.Builder
ofCodeBuildOptions
-