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

feat(codepipeline): change default pipeline type to V2 (under feature flag) #29096

Merged
merged 23 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f579c37
feat(codepipeline): change default value for pipelineType to V2 (unde…
go-to-k Feb 14, 2024
fed918e
integ test
go-to-k Feb 14, 2024
aeca2c8
change existing integ tests
go-to-k Feb 14, 2024
96dbaad
postCliContext
go-to-k Feb 14, 2024
9c80945
add to change rest integ tests
go-to-k Feb 14, 2024
dc60a16
appconfig integ
go-to-k Feb 14, 2024
5e7e47b
integ.codepipeline-start-pipeline-execution.ts
go-to-k Feb 14, 2024
1223806
Merge branch 'main' into codepipeline-pipeline-type-default-v2
go-to-k Feb 17, 2024
a28c548
README
go-to-k Mar 3, 2024
5a23e30
Merge branch 'main' of https://github.com/go-to-k/aws-cdk into codepi…
go-to-k Mar 11, 2024
599243b
change unit tests
go-to-k Mar 11, 2024
3724ba6
aws-appconfig/test/integ.configuration
go-to-k Mar 11, 2024
ae27b58
integ.pipeline-type-v2-by-default
go-to-k Mar 11, 2024
aae1861
README
go-to-k Mar 12, 2024
79cd494
test for app context
go-to-k Mar 12, 2024
ce29920
test postCliContext vs context
go-to-k Mar 12, 2024
31c5b13
Revert "test for app context"
go-to-k Mar 12, 2024
85f008e
change postCliContext to context
go-to-k Mar 12, 2024
8ad99f0
change postCliContext added newly to context
go-to-k Mar 12, 2024
2621600
Revert "change postCliContext added newly to context"
go-to-k Mar 12, 2024
6e0689d
Revert "change postCliContext to context"
go-to-k Mar 12, 2024
0abe694
Revert "test postCliContext vs context"
go-to-k Mar 12, 2024
b55237b
Merge branch 'main' into codepipeline-pipeline-type-default-v2
mergify[bot] Mar 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ export class StackSetPipelineStack extends Stack {
}
}

const app = new App();
const app = new App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});
Comment on lines +79 to +83
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is not specified, CodeBuild CI will error.

@aws-cdk-testing/framework-integ:   CHANGED    pipelines/test/integ.pipeline 1.467s
@aws-cdk-testing/framework-integ:       Resources
@aws-cdk-testing/framework-integ: [~] AWS::CodePipeline::Pipeline Pipeline9850B417 
@aws-cdk-testing/framework-integ:  笏披楳 [+] PipelineType
@aws-cdk-testing/framework-integ:      笏披楳 V2
@aws-cdk-testing/framework-integ: Snapshot Results: 
@aws-cdk-testing/framework-integ: Tests:    41 failed, 801 total
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.js
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.js
@aws-cdk-testing/framework-integ: Error: Some tests failed!
@aws-cdk-testing/framework-integ: To re-run failed tests run: integ-runner --update-on-failed
@aws-cdk-testing/framework-integ:     at main (/codebuild/output/src3346000757/src/github.com/aws/aws-cdk/packages/@aws-cdk/integ-runner/lib/cli.js:191:19)
@aws-cdk-testing/framework-integ: Error: integ-runner exited with error code 1
@aws-cdk-testing/framework-integ: Tests failed. Total time (2m5.3s) | integ-runner (1m49.2s) | /codebuild/output/src3346000757/src/github.com/aws/aws-cdk/node_modules/jest/bin/jest.js (14.2s)
@aws-cdk-testing/framework-integ: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused why we need to set the feature flag to false in context. Wouldn't this check be false when no context is provided and doesn't change the integ test behaviour?

const isDefaultV2 = FeatureFlags.of(this).isEnabled(cxapi.CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2);

Copy link
Contributor Author

@go-to-k go-to-k Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused too, but I actually got the error in the CodeBuild CI. I thought there was no difference in the local environment...
I'm willing to take time somewhere to investigate.

Copy link
Contributor Author

@go-to-k go-to-k Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As expected, it appears that if this change is not made, there will be a difference. However, the difference does not occur in my local environment (using the integ runner). I guess that perhaps the CodeBuild settings running in CI Workflow (or build.sh) are different.

79cd494

@aws-cdk-testing/framework-integ:   CHANGED    aws-codepipeline-actions/test/cloudformation/integ.stacksets 2.077s
@aws-cdk-testing/framework-integ:       Resources
@aws-cdk-testing/framework-integ: [~] AWS::CodePipeline::Pipeline PipelineC660917D 
@aws-cdk-testing/framework-integ:  笏披楳 [+] PipelineType
@aws-cdk-testing/framework-integ:      笏披楳 V2

Build log

const stack = new StackSetPipelineStack(app, 'StackSetPipelineStack');
new IntegTest(app, 'StackSetPipelineStackInteg', {
testCases: [stack],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';
import { STANDARD_NODEJS_RUNTIME } from '../../config';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-lambda');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import { App, RemovalPolicy, SecretValue, Stack } from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new App();

const app = new App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});
const stack = new Stack(app, 'aws-cdk-codepipeline-alexa-deploy');

const bucket = new s3.Bucket(stack, 'PipelineBucket', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const region = 'us-west-2'; // hardcode the region
const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation-cross-region', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation-cross-region-with-action-role', {});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codebuild-batch');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codebuild-multiple-inputs-outputs');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

/* eslint-disable quote-props */

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit-codebuild');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ import * as codecommit from 'aws-cdk-lib/aws-codecommit';
import * as codepipeline from 'aws-cdk-lib/aws-codepipeline';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';
import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME } from 'aws-cdk-lib/cx-api';
import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 } from 'aws-cdk-lib/cx-api';
import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests-alpha';
import { LambdaFunction } from 'aws-cdk-lib/aws-events-targets';
import { Code, Runtime, Function } from 'aws-cdk-lib/aws-lambda';
import { PolicyStatement } from 'aws-cdk-lib/aws-iam';
import * as path from 'path';

const defaultBranchFeatureFlag = { [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: true };
const app = new cdk.App({ postCliContext: defaultBranchFeatureFlag });
const defaultFeatureFlag = {
[CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: true,
[CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2]: false,
};
const app = new cdk.App({ postCliContext: defaultFeatureFlag });

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit-custom-event');
const branch = 'test-branch';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import * as codecommit from 'aws-cdk-lib/aws-codecommit';
import * as codepipeline from 'aws-cdk-lib/aws-codepipeline';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';
import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME } from 'aws-cdk-lib/cx-api';
import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 } from 'aws-cdk-lib/cx-api';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';

const defaultBranchFeatureFlag = { [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: true };
const app = new cdk.App({ postCliContext: defaultBranchFeatureFlag });
const defaultFeatureFlag = {
[CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: true,
[CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2]: false,
};
const app = new cdk.App({ postCliContext: defaultFeatureFlag });

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit-main');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import * as codecommit from 'aws-cdk-lib/aws-codecommit';
import * as codepipeline from 'aws-cdk-lib/aws-codepipeline';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';
import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME } from 'aws-cdk-lib/cx-api';
import { CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 } from 'aws-cdk-lib/cx-api';

const defaultBranchFeatureFlag = { [CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: false };
const app = new cdk.App({
postCliContext: defaultBranchFeatureFlag,
});
const defaultFeatureFlag = {
[CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME]: false,
[CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2]: false,
};
const app = new cdk.App({ postCliContext: defaultFeatureFlag });

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codedeploy-ecs');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codedeploy');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';
* was triggered successfully.
*/

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-ecr-source');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

/* eslint-disable quote-props */

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-ecs-deploy');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';
* 5. Manually delete the 'aws-cdk-codepipeline-elastic-beanstalk-deploy' stack
*/

const app = new App();
const app = new App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new Stack(app, 'aws-cdk-codepipeline-elastic-beanstalk-deploy');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import * as sns from 'aws-cdk-lib/aws-sns';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-pipeline-event-target');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-jenkins');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import * as s3 from 'aws-cdk-lib/aws-s3';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-manual-approval');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { Duration } from 'aws-cdk-lib';
import { IntegTest, ExpectedResult, Match } from '@aws-cdk/integ-tests-alpha';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-s3-deploy');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
import * as cdk from 'aws-cdk-lib';
import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions';

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
'@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false,
},
});

const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-stepfunctions');

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading