Interface CodeBuildActionProps

All Superinterfaces:
CommonActionProps, CommonAwsActionProps,
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:14.375Z") @Stability(Stable) public interface CodeBuildActionProps extends, CommonAwsActionProps
Construction properties of the CodeBuildAction CodeBuild build CodePipeline action.


 // Create a Cloudfront Web Distribution
 Distribution distribution;
 // Create the build project that will invalidate the cache
 PipelineProject invalidateBuildProject = PipelineProject.Builder.create(this, "InvalidateProject")
                 "version", "0.2",
                 "phases", Map.of(
                         "build", Map.of(
                                 "commands", List.of("aws cloudfront create-invalidation --distribution-id ${CLOUDFRONT_ID} --paths \"/*\""))))))
                 "CLOUDFRONT_ID", BuildEnvironmentVariable.builder().value(distribution.getDistributionId()).build()))
 // Add Cloudfront invalidation permissions to the project
 String distributionArn = String.format("arn:aws:cloudfront::%s:distribution/%s", this.account, distribution.getDistributionId());
 // Create the pipeline (here only the S3 deploy and Invalidate cache build)
 Bucket deployBucket = new Bucket(this, "DeployBucket");
 Artifact deployInput = new Artifact();
 Pipeline.Builder.create(this, "Pipeline")
  • Method Details

    • getInput

      @Stability(Stable) @NotNull Artifact getInput()
      The source to use as input for this action.
    • getProject

      @Stability(Stable) @NotNull IProject getProject()
      The action's Project.
    • getCheckSecretsInPlainTextEnvVariables

      @Stability(Stable) @Nullable default Boolean getCheckSecretsInPlainTextEnvVariables()
      Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable.

      Default: true

    • getCombineBatchBuildArtifacts

      @Stability(Stable) @Nullable default Boolean getCombineBatchBuildArtifacts()
      Combine the build artifacts for a batch builds.

      Enabling this will combine the build artifacts into the same location for batch builds. If executeBatchBuild is not set to true, this property is ignored.

      Default: false

    • getEnvironmentVariables

      @Stability(Stable) @Nullable default Map<String,BuildEnvironmentVariable> getEnvironmentVariables()
      The environment variables to pass to the CodeBuild project when this action executes.

      If a variable with the same name was set both on the project level, and here, this value will take precedence.

      Default: - No additional environment variables are specified.

    • getExecuteBatchBuild

      @Stability(Stable) @Nullable default Boolean getExecuteBatchBuild()
      Trigger a batch build.

      Enabling this will enable batch builds on the CodeBuild project.

      Default: false

    • getExtraInputs

      @Stability(Stable) @Nullable default List<Artifact> getExtraInputs()
      The list of additional input Artifacts for this action.

      The directories the additional inputs will be available at are available during the project's build in the CODEBUILD_SRC_DIR_invalid input: '<'artifact-name> environment variables. The project's build always starts in the directory with the primary input artifact checked out, the one pointed to by the input property. For more information, see .

    • getOutputs

      @Stability(Stable) @Nullable default List<Artifact> getOutputs()
      The list of output Artifacts for this action.

      Note: if you specify more than one output Artifact here, you cannot use the primary 'artifacts' section of the buildspec; you have to use the 'secondary-artifacts' section instead. See for details.

      Default: the action will not have any outputs

    • getType

      @Stability(Stable) @Nullable default CodeBuildActionType getType()
      The type of the action that determines its CodePipeline Category - Build, or Test.

      Default: CodeBuildActionType.BUILD

    • builder

      @Stability(Stable) static CodeBuildActionProps.Builder builder()
      a CodeBuildActionProps.Builder of CodeBuildActionProps