Interface CodeBuildStepProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,ShellStepProps
- All Known Implementing Classes:
CodeBuildStepProps.Jsii$Proxy
Example:
CodePipeline.Builder.create(this, "Pipeline") .synth(CodeBuildStep.Builder.create("Synth") .input(CodePipelineSource.connection("my-org/my-app", "main", ConnectionSourceOptions.builder() .connectionArn("arn:aws:codestar-connections:us-east-1:222222222222:connection/7d2469ff-514a-4e4f-9003-5ca4a43cdc41") .build())) .commands(List.of("...", "npm ci", "npm run build", "npx cdk synth", "...")) .rolePolicyStatements(List.of( PolicyStatement.Builder.create() .actions(List.of("sts:AssumeRole")) .resources(List.of("*")) .conditions(Map.of( "StringEquals", Map.of( "iam:ResourceTag/aws-cdk:bootstrap-role", "lookup"))) .build())) .build()) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCodeBuildStepProps
static final class
An implementation forCodeBuildStepProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic CodeBuildStepProps.Builder
builder()
default IRole
Custom execution role to be used for the Code Build Action.default BuildEnvironment
Changes to environment.default BuildSpec
Additional configuration that can only be configured via BuildSpec.default String
Name for the generated CodeBuild project.default IRole
getRole()
Custom execution role to be used for the CodeBuild project.default List<PolicyStatement>
Policy statements to add to role used during the synth.default List<ISecurityGroup>
Which security group to associate with the script's project network interfaces.default SubnetSelection
Which subnets to use.default Duration
The number of minutes after which AWS CodeBuild stops the build if it's not complete.default IVpc
getVpc()
The VPC where to execute the SimpleSynth.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.pipelines.ShellStepProps
getAdditionalInputs, getCommands, getEnv, getEnvFromCfnOutputs, getInput, getInstallCommands, getPrimaryOutputDirectory
-
Method Details
-
getActionRole
Custom execution role to be used for the Code Build Action.Default: - A role is automatically created
-
getBuildEnvironment
Changes to environment.This environment will be combined with the pipeline's default environment.
Default: - Use the pipeline's default build environment
-
getPartialBuildSpec
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
-
getProjectName
Name for the generated CodeBuild project.Default: - Automatically generated
-
getRole
Custom execution role to be used for the CodeBuild project.Default: - A role is automatically created
-
getRolePolicyStatements
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
-
getSecurityGroups
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.
-
getSubnetSelection
Which subnets to use.Only used if 'vpc' is supplied.
Default: - All private subnets.
-
getTimeout
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)
-
getVpc
The VPC where to execute the SimpleSynth.Default: - No VPC
-
builder
- Returns:
- a
CodeBuildStepProps.Builder
ofCodeBuildStepProps
-