Class CodeBuildActionProps.Builder
java.lang.Object
software.amazon.awscdk.services.codepipeline.actions.CodeBuildActionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CodeBuildActionProps>
- Enclosing interface:
- CodeBuildActionProps
@Stability(Stable)
public static final class CodeBuildActionProps.Builder
extends Object
implements software.amazon.jsii.Builder<CodeBuildActionProps>
A builder for
CodeBuildActionProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactionName
(String actionName) Sets the value ofCommonActionProps.getActionName()
build()
Builds the configured instance.checkSecretsInPlainTextEnvVariables
(Boolean checkSecretsInPlainTextEnvVariables) Sets the value ofCodeBuildActionProps.getCheckSecretsInPlainTextEnvVariables()
combineBatchBuildArtifacts
(Boolean combineBatchBuildArtifacts) Sets the value ofCodeBuildActionProps.getCombineBatchBuildArtifacts()
environmentVariables
(Map<String, ? extends BuildEnvironmentVariable> environmentVariables) Sets the value ofCodeBuildActionProps.getEnvironmentVariables()
executeBatchBuild
(Boolean executeBatchBuild) Sets the value ofCodeBuildActionProps.getExecuteBatchBuild()
extraInputs
(List<? extends Artifact> extraInputs) Sets the value ofCodeBuildActionProps.getExtraInputs()
Sets the value ofCodeBuildActionProps.getInput()
Sets the value ofCodeBuildActionProps.getOutputs()
Sets the value ofCodeBuildActionProps.getProject()
Sets the value ofCommonAwsActionProps.getRole()
Sets the value ofCommonActionProps.getRunOrder()
type
(CodeBuildActionType type) Sets the value ofCodeBuildActionProps.getType()
variablesNamespace
(String variablesNamespace) Sets the value ofCommonActionProps.getVariablesNamespace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
input
Sets the value ofCodeBuildActionProps.getInput()
- Parameters:
input
- The source to use as input for this action. This parameter is required.- Returns:
this
-
project
Sets the value ofCodeBuildActionProps.getProject()
- Parameters:
project
- The action's Project. This parameter is required.- Returns:
this
-
checkSecretsInPlainTextEnvVariables
@Stability(Stable) public CodeBuildActionProps.Builder checkSecretsInPlainTextEnvVariables(Boolean checkSecretsInPlainTextEnvVariables) Sets the value ofCodeBuildActionProps.getCheckSecretsInPlainTextEnvVariables()
- 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.- Returns:
this
-
combineBatchBuildArtifacts
@Stability(Stable) public CodeBuildActionProps.Builder combineBatchBuildArtifacts(Boolean combineBatchBuildArtifacts) Sets the value ofCodeBuildActionProps.getCombineBatchBuildArtifacts()
- Parameters:
combineBatchBuildArtifacts
- Combine the build artifacts for a batch builds. Enabling this will combine the build artifacts into the same location for batch builds. IfexecuteBatchBuild
is not set totrue
, this property is ignored.- Returns:
this
-
environmentVariables
@Stability(Stable) public CodeBuildActionProps.Builder environmentVariables(Map<String, ? extends BuildEnvironmentVariable> environmentVariables) Sets the value ofCodeBuildActionProps.getEnvironmentVariables()
- Parameters:
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.- Returns:
this
-
executeBatchBuild
Sets the value ofCodeBuildActionProps.getExecuteBatchBuild()
- Parameters:
executeBatchBuild
- Trigger a batch build. Enabling this will enable batch builds on the CodeBuild project.- Returns:
this
-
extraInputs
@Stability(Stable) public CodeBuildActionProps.Builder extraInputs(List<? extends Artifact> extraInputs) Sets the value ofCodeBuildActionProps.getExtraInputs()
- Parameters:
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_<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 theinput
property. For more information, see https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html .- Returns:
this
-
outputs
Sets the value ofCodeBuildActionProps.getOutputs()
- Parameters:
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.- Returns:
this
-
type
Sets the value ofCodeBuildActionProps.getType()
- Parameters:
type
- The type of the action that determines its CodePipeline Category - Build, or Test.- Returns:
this
-
role
Sets the value ofCommonAwsActionProps.getRole()
- Parameters:
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 yourIAction.bind
method in theActionBindOptions.role
property.- Returns:
this
-
actionName
Sets the value ofCommonActionProps.getActionName()
- Parameters:
actionName
- The physical, human-readable name of the Action. This parameter is required. Note that Action names must be unique within a single Stage.- Returns:
this
-
runOrder
Sets the value ofCommonActionProps.getRunOrder()
- Parameters:
runOrder
- The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute.- Returns:
this
-
variablesNamespace
@Stability(Stable) public CodeBuildActionProps.Builder variablesNamespace(String variablesNamespace) Sets the value ofCommonActionProps.getVariablesNamespace()
- Parameters:
variablesNamespace
- The name of the namespace to use for variables emitted by this action.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CodeBuildActionProps>
- Returns:
- a new instance of
CodeBuildActionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-