Interface BuildEnvironment

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
BuildEnvironment.Jsii$Proxy

@Generated(value="jsii-pacmak/1.92.0 (build db7f27d)", date="2023-12-06T04:49:35.989Z") @Stability(Stable) public interface BuildEnvironment extends software.amazon.jsii.JsiiSerializable
Example:

 Vpc vpc;
 SecurityGroup mySecurityGroup;
 CodeBuildStep.Builder.create("Synth")
         // ...standard ShellStep props...
         .commands(List.of())
         .env(Map.of())
         // If you are using a CodeBuildStep explicitly, set the 'cdk.out' directory
         // to be the synth step's output.
         .primaryOutputDirectory("cdk.out")
         // Control the name of the project
         .projectName("MyProject")
         // Control parts of the BuildSpec other than the regular 'build' and 'install' commands
         .partialBuildSpec(BuildSpec.fromObject(Map.of(
                 "version", "0.2")))
         // Control the build environment
         .buildEnvironment(BuildEnvironment.builder()
                 .computeType(ComputeType.LARGE)
                 .privileged(true)
                 .build())
         .timeout(Duration.minutes(90))
         .fileSystemLocations(List.of(FileSystemLocation.efs(EfsFileSystemLocationProps.builder()
                 .identifier("myidentifier2")
                 .location("myclodation.mydnsroot.com:/loc")
                 .mountPoint("/media")
                 .mountOptions("opts")
                 .build())))
         // Control Elastic Network Interface creation
         .vpc(vpc)
         .subnetSelection(SubnetSelection.builder().subnetType(SubnetType.PRIVATE_WITH_EGRESS).build())
         .securityGroups(List.of(mySecurityGroup))
         // Control caching
         .cache(Cache.bucket(new Bucket(this, "Cache")))
         // Additional policy statements for the execution role
         .rolePolicyStatements(List.of(
             PolicyStatement.Builder.create().build()))
         .build();
 
  • Method Details

    • getBuildImage

      @Stability(Stable) @Nullable default IBuildImage getBuildImage()
      The image used for the builds.

      Default: LinuxBuildImage.STANDARD_1_0

    • getCertificate

      @Stability(Stable) @Nullable default BuildEnvironmentCertificate getCertificate()
      The location of the PEM-encoded certificate for the build project.

      Default: - No external certificate is added to the project

    • getComputeType

      @Stability(Stable) @Nullable default ComputeType getComputeType()
      The type of compute to use for this build.

      See the ComputeType enum for the possible values.

      Default: taken from `#buildImage#defaultComputeType`

    • getEnvironmentVariables

      @Stability(Stable) @Nullable default Map<String,BuildEnvironmentVariable> getEnvironmentVariables()
      The environment variables that your builds can use.
    • getPrivileged

      @Stability(Stable) @Nullable default Boolean 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

      @Stability(Stable) static BuildEnvironment.Builder builder()
      Returns:
      a BuildEnvironment.Builder of BuildEnvironment