interface PipelineProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CodePipeline.PipelineProps |
![]() | software.amazon.awscdk.services.codepipeline.PipelineProps |
![]() | aws_cdk.aws_codepipeline.PipelineProps |
![]() | @aws-cdk/aws-codepipeline » PipelineProps |
Example
declare const project: codebuild.PipelineProject;
const repository = new codecommit.Repository(this, 'MyRepository', {
repositoryName: 'MyRepository',
});
const project = new codebuild.PipelineProject(this, 'MyProject');
const sourceOutput = new codepipeline.Artifact();
const sourceAction = new codepipeline_actions.CodeCommitSourceAction({
actionName: 'CodeCommit',
repository,
output: sourceOutput,
});
const buildAction = new codepipeline_actions.CodeBuildAction({
actionName: 'CodeBuild',
project,
input: sourceOutput,
outputs: [new codepipeline.Artifact()], // optional
executeBatchBuild: true, // optional, defaults to false
combineBatchBuildArtifacts: true, // optional, defaults to false
});
new codepipeline.Pipeline(this, 'MyPipeline', {
stages: [
{
stageName: 'Source',
actions: [sourceAction],
},
{
stageName: 'Build',
actions: [buildAction],
},
],
});
Properties
Name | Type | Description |
---|---|---|
artifact | IBucket | The S3 bucket used by this Pipeline to store artifacts. |
cross | boolean | Create KMS keys for cross-account deployments. |
cross | { [string]: IBucket } | A map of region to S3 bucket name used for cross-region CodePipeline. |
enable | boolean | Enable KMS key rotation for the generated KMS keys. |
pipeline | string | Name of the pipeline. |
restart | boolean | Indicates whether to rerun the AWS CodePipeline pipeline after you update it. |
reuse | boolean | Reuse the same cross region support stack for all pipelines in the App. |
role? | IRole | The IAM role to be assumed by this Pipeline. |
stages? | Stage [] | The list of Stages, in order, to create this Pipeline with. |
artifactBucket?
Type:
IBucket
(optional, default: A new S3 bucket will be created.)
The S3 bucket used by this Pipeline to store artifacts.
crossAccountKeys?
Type:
boolean
(optional, default: true)
Create KMS keys for cross-account deployments.
This controls whether the pipeline is enabled for cross-account deployments.
By default cross-account deployments are enabled, but this feature requires that KMS Customer Master Keys are created which have a cost of $1/month.
If you do not need cross-account deployments, you can set this to false
to
not create those keys and save on that cost (the artifact bucket will be
encrypted with an AWS-managed key). However, cross-account deployments will
no longer be possible.
crossRegionReplicationBuckets?
Type:
{ [string]:
IBucket
}
(optional, default: None.)
A map of region to S3 bucket name used for cross-region CodePipeline.
For every Action that you specify targeting a different region than the Pipeline itself, if you don't provide an explicit Bucket for that region using this property, the construct will automatically create a Stack containing an S3 Bucket in that region.
enableKeyRotation?
Type:
boolean
(optional, default: false (key rotation is disabled))
Enable KMS key rotation for the generated KMS keys.
By default KMS key rotation is disabled, but will add an additional $1/month for each year the key exists when enabled.
pipelineName?
Type:
string
(optional, default: AWS CloudFormation generates an ID and uses that for the pipeline name.)
Name of the pipeline.
restartExecutionOnUpdate?
Type:
boolean
(optional, default: false)
Indicates whether to rerun the AWS CodePipeline pipeline after you update it.
reuseCrossRegionSupportStacks?
Type:
boolean
(optional, default: true (Use the same support stack for all pipelines in App))
Reuse the same cross region support stack for all pipelines in the App.
role?
Type:
IRole
(optional, default: a new IAM role will be created.)
The IAM role to be assumed by this Pipeline.
stages?
Type:
Stage
[]
(optional, default: None.)
The list of Stages, in order, to create this Pipeline with.
You can always add more Stages later by calling {@link Pipeline#addStage}.