Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pipelines): generates warning since CDK 2.128.0 due to addition of v2 pipeline support in aws-codepipeline #29199

Merged
merged 9 commits into from
Feb 21, 2024
5 changes: 3 additions & 2 deletions packages/aws-cdk-lib/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ cluster directly: use CDK file assets with CloudFormation Init for instances, or
CDK container assets for ECS clusters instead.

Give the CDK Pipelines way of doing things a shot first: you might find it does
everything you need. If you want or need more control, we recommend you drop
down to using the `aws-codepipeline` construct library directly.
everything you need. If you need more control, or if you need `v2` support from
`aws-codepipeline`, we recommend you drop down to using the `aws-codepipeline`
construct library directly.

> This module contains two sets of APIs: an **original** and a **modern** version of
> CDK Pipelines. The *modern* API has been updated to be easier to work with and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ export class CodePipeline extends PipelineBase {
} else {
this._pipeline = new cp.Pipeline(this, 'Pipeline', {
pipelineName: this.props.pipelineName,
pipelineType: cp.PipelineType.V1,
crossAccountKeys: this.props.crossAccountKeys ?? false,
crossRegionReplicationBuckets: this.props.crossRegionReplicationBuckets,
reuseCrossRegionSupportStacks: this.props.reuseCrossRegionSupportStacks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ test('Policy sizes do not exceed the maximum size', () => {
// expect template size warning
const annotations = Annotations.fromStack(pipelineStack);
annotations.hasWarning('*', Match.stringLikeRegexp('^Template size is approaching limit'));
const warnings = annotations.findWarning('*', Match.anyValue());
expect(warnings.length).toEqual(1);
});

test('CodeBuild action role has the right AssumeRolePolicyDocument', () => {
Expand Down
Loading