Class CodeBuildAction.Builder

java.lang.Object
software.amazon.awscdk.services.codepipeline.actions.CodeBuildAction.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CodeBuildAction>
Enclosing class:
CodeBuildAction

@Stability(Stable) public static final class CodeBuildAction.Builder extends Object implements software.amazon.jsii.Builder<CodeBuildAction>
A fluent builder for CodeBuildAction.
  • Method Details

    • create

      @Stability(Stable) public static CodeBuildAction.Builder create()
      Returns:
      a new instance of CodeBuildAction.Builder.
    • actionName

      @Stability(Stable) public CodeBuildAction.Builder actionName(String actionName)
      The physical, human-readable name of the Action.

      Note that Action names must be unique within a single Stage.

      Parameters:
      actionName - The physical, human-readable name of the Action. This parameter is required.
      Returns:
      this
    • runOrder

      @Stability(Stable) public CodeBuildAction.Builder runOrder(Number runOrder)
      The runOrder property for this Action.

      RunOrder determines the relative order in which multiple Actions in the same Stage execute.

      Default: 1

      Parameters:
      runOrder - The runOrder property for this Action. This parameter is required.
      Returns:
      this
      See Also:
    • variablesNamespace

      @Stability(Stable) public CodeBuildAction.Builder variablesNamespace(String variablesNamespace)
      The name of the namespace to use for variables emitted by this action.

      Default: - a name will be generated, based on the stage and action names, if any of the action's variables were referenced - otherwise, no namespace will be set

      Parameters:
      variablesNamespace - The name of the namespace to use for variables emitted by this action. This parameter is required.
      Returns:
      this
    • role

      @Stability(Stable) public CodeBuildAction.Builder role(IRole role)
      The Role in which context's this Action will be executing in.

      The Pipeline's Role will assume this Role (the required permissions for that will be granted automatically) right before executing this Action. This Action will be passed into your

      invalid @link
      IAction.bind
      method in the
      invalid @link
      ActionBindOptions.role
      property.

      Default: a new Role will be generated

      Parameters:
      role - The Role in which context's this Action will be executing in. This parameter is required.
      Returns:
      this
    • input

      @Stability(Stable) public CodeBuildAction.Builder input(Artifact input)
      The source to use as input for this action.

      Parameters:
      input - The source to use as input for this action. This parameter is required.
      Returns:
      this
    • project

      @Stability(Stable) public CodeBuildAction.Builder project(IProject project)
      The action's Project.

      Parameters:
      project - The action's Project. This parameter is required.
      Returns:
      this
    • checkSecretsInPlainTextEnvVariables

      @Stability(Stable) public CodeBuildAction.Builder checkSecretsInPlainTextEnvVariables(Boolean checkSecretsInPlainTextEnvVariables)
      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

      Parameters:
      checkSecretsInPlainTextEnvVariables - 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. This parameter is required.
      Returns:
      this
    • combineBatchBuildArtifacts

      @Stability(Stable) public CodeBuildAction.Builder combineBatchBuildArtifacts(Boolean combineBatchBuildArtifacts)
      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

      Parameters:
      combineBatchBuildArtifacts - Combine the build artifacts for a batch builds. This parameter is required.
      Returns:
      this
    • environmentVariables

      @Stability(Stable) public CodeBuildAction.Builder environmentVariables(Map<String,? extends BuildEnvironmentVariable> environmentVariables)
      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.

      Parameters:
      environmentVariables - The environment variables to pass to the CodeBuild project when this action executes. This parameter is required.
      Returns:
      this
    • executeBatchBuild

      @Stability(Stable) public CodeBuildAction.Builder executeBatchBuild(Boolean executeBatchBuild)
      Trigger a batch build.

      Enabling this will enable batch builds on the CodeBuild project.

      Default: false

      Parameters:
      executeBatchBuild - Trigger a batch build. This parameter is required.
      Returns:
      this
    • extraInputs

      @Stability(Stable) public CodeBuildAction.Builder extraInputs(List<? extends Artifact> extraInputs)
      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(software.amazon.awscdk.services.codepipeline.Artifact) property. For more information, see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html .

      Parameters:
      extraInputs - The list of additional input Artifacts for this action. This parameter is required.
      Returns:
      this
    • outputs

      @Stability(Stable) public CodeBuildAction.Builder outputs(List<? extends Artifact> outputs)
      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 https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html for details.

      Default: the action will not have any outputs

      Parameters:
      outputs - The list of output Artifacts for this action. This parameter is required.
      Returns:
      this
    • type

      @Stability(Stable) public CodeBuildAction.Builder type(CodeBuildActionType type)
      The type of the action that determines its CodePipeline Category - Build, or Test.

      Default: CodeBuildActionType.BUILD

      Parameters:
      type - The type of the action that determines its CodePipeline Category - Build, or Test. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CodeBuildAction build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CodeBuildAction>
      Returns:
      a newly built instance of CodeBuildAction.