All Implemented Interfaces:
software.amazon.jsii.Builder<CodeBuildStep >
Enclosing class:
CodeBuildStep
@Stability(Stable)
public static final class CodeBuildStep.Builder
extends Object
implements software.amazon.jsii.Builder<CodeBuildStep >
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Custom execution role to be used for the Code Build Action.
Additional FileSets to put in other directories.
Environment variables to set.
Set environment variables based on Stack Outputs.
ProjectFileSystemLocation objects for CodeBuild build projects.
FileSet to run these scripts on.
Installation commands to run before the regular commands.
Information about logs for CodeBuild projects.
Additional configuration that can only be configured via BuildSpec.
The directory that will contain the primary output fileset.
Name for the generated CodeBuild project.
Custom execution role to be used for the CodeBuild project.
Policy statements to add to role used during the synth.
Which security group to associate with the script's project network interfaces.
The number of minutes after which AWS CodeBuild stops the build if it's not complete.
The VPC where to execute the SimpleSynth.
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Method Details
create
Parameters:
id
- Identifier for this step. This parameter is required.
Returns:
a new instance of CodeBuildStep.Builder
.
commands
Parameters:
commands
- Commands to run. This parameter is required.
Returns:
this
env
Environment variables to set.
Default: - No environment variables
Parameters:
env
- Environment variables to set. This parameter is required.
Returns:
this
envFromCfnOutputs
Set environment variables based on Stack Outputs.
ShellStep
s following stack or stage deployments may
access the CfnOutput
s of those stacks to get access to
--for example--automatically generated resource names or
endpoint URLs.
Default: - No environment variables created from stack outputs
Parameters:
envFromCfnOutputs
- Set environment variables based on Stack Outputs. This parameter is required.
Returns:
this
installCommands
Installation commands to run before the regular commands.
For deployment engines that support it, install commands will be classified
differently in the job history from the regular commands
.
Default: - No installation commands
Parameters:
installCommands
- Installation commands to run before the regular commands. This parameter is required.
Returns:
this
primaryOutputDirectory
The directory that will contain the primary output fileset.
After running the script, the contents of the given directory
will be treated as the primary output of this Step.
Default: - No primary output
Parameters:
primaryOutputDirectory
- The directory that will contain the primary output fileset. This parameter is required.
Returns:
this
actionRole
Custom execution role to be used for the Code Build Action.
Default: - A role is automatically created
Parameters:
actionRole
- Custom execution role to be used for the Code Build Action. This parameter is required.
Returns:
this
buildEnvironment
Changes to environment.
This environment will be combined with the pipeline's default
environment.
Default: - Use the pipeline's default build environment
Parameters:
buildEnvironment
- Changes to environment. This parameter is required.
Returns:
this
cache
Caching strategy to use.
Default: - No cache
Parameters:
cache
- Caching strategy to use. This parameter is required.
Returns:
this
fileSystemLocations
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.
Default: - no file system locations
Parameters:
fileSystemLocations
- ProjectFileSystemLocation objects for CodeBuild build projects. This parameter is required.
Returns:
this
logging
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
Parameters:
logging
- Information about logs for CodeBuild projects. This parameter is required.
Returns:
this
partialBuildSpec
Additional configuration that can only be configured via BuildSpec.
You should not use this to specify output artifacts; those
should be supplied via the other properties of this class, otherwise
CDK Pipelines won't be able to inspect the artifacts.
Set the commands
to an empty array if you want to fully specify
the BuildSpec using this field.
The BuildSpec must be available inline--it cannot reference a file
on disk.
Default: - BuildSpec completely derived from other properties
Parameters:
partialBuildSpec
- Additional configuration that can only be configured via BuildSpec. This parameter is required.
Returns:
this
projectName
Name for the generated CodeBuild project.
Default: - Automatically generated
Parameters:
projectName
- Name for the generated CodeBuild project. This parameter is required.
Returns:
this
role
Custom execution role to be used for the CodeBuild project.
Default: - A role is automatically created
Parameters:
role
- Custom execution role to be used for the CodeBuild project. This parameter is required.
Returns:
this
rolePolicyStatements
Policy statements to add to role used during the synth.
Can be used to add acces to a CodeArtifact repository etc.
Default: - No policy statements added to CodeBuild Project Role
Parameters:
rolePolicyStatements
- Policy statements to add to role used during the synth. This parameter is required.
Returns:
this
securityGroups
Which security group to associate with the script's project network interfaces.
If no security group is identified, one will be created automatically.
Only used if 'vpc' is supplied.
Default: - Security group will be automatically created.
Parameters:
securityGroups
- Which security group to associate with the script's project network interfaces. This parameter is required.
Returns:
this
subnetSelection
Which subnets to use.
Only used if 'vpc' is supplied.
Default: - All private subnets.
Parameters:
subnetSelection
- Which subnets to use. This parameter is required.
Returns:
this
timeout
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)
Parameters:
timeout
- The number of minutes after which AWS CodeBuild stops the build if it's not complete. This parameter is required.
Returns:
this
vpc
The VPC where to execute the SimpleSynth.
Default: - No VPC
Parameters:
vpc
- The VPC where to execute the SimpleSynth. This parameter is required.
Returns:
this
build
Specified by:
build
in interface software.amazon.jsii.Builder<CodeBuildStep >
Returns:
a newly built instance of CodeBuildStep
.