From f579c37eaf285e69f80fbf11f950972c6c62e5de Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:05:14 +0900 Subject: [PATCH 01/20] feat(codepipeline): change default value for pipelineType to V2 (under feature flag) --- packages/@aws-cdk/cx-api/FEATURE_FLAGS.md | 20 ++++++++++++- .../aws-codepipeline/lib/pipeline.ts | 11 +++---- .../aws-codepipeline/test/pipeline.test.ts | 30 ++++++++++++++++++- packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md | 20 ++++++++++++- packages/aws-cdk-lib/cx-api/README.md | 17 +++++++++++ packages/aws-cdk-lib/cx-api/lib/features.ts | 14 +++++++++ 6 files changed, 104 insertions(+), 8 deletions(-) diff --git a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md index 4fe530e600eff..30a52eb8a9bad 100644 --- a/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md +++ b/packages/@aws-cdk/cx-api/FEATURE_FLAGS.md @@ -65,6 +65,7 @@ Flags come in three types: | [@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource](#aws-cdkaws-codepipeline-actionsusenewdefaultbranchforcodecommitsource) | When enabled, the CodeCommit source action is using the default branch name 'main'. | 2.103.1 | (fix) | | [@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction](#aws-cdkaws-cloudwatch-actionschangelambdapermissionlogicalidforlambdaaction) | When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID. | 2.124.0 | (fix) | | [@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse](#aws-cdkaws-codepipelinecrossaccountkeysdefaultvaluetofalse) | Enables Pipeline to set the default value for crossAccountKeys to false. | V2NEXT | (default) | +| [@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2](#aws-cdkaws-codepipelinedefaultpipelinetypetov2) | Enables Pipeline to set the default pipeline type to V2. | V2NEXT | (default) | @@ -120,7 +121,8 @@ The following json shows the current recommended set of flags, as `cdk init` wou "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, - "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true } } ``` @@ -1231,4 +1233,20 @@ construct, the construct automatically defaults the value of this property to fa **Compatibility with old behavior:** Pass `crossAccountKeys: true` to `Pipeline` construct to restore the previous behavior. +### @aws-cdk/aws-codepipeline:defaultPipelineTypeToV2 + +*Enables Pipeline to set the default pipeline type to V2.* (default) + +When this feature flag is enabled, and the `pipelineType` property is not provided in a `Pipeline` +construct, the construct automatically defaults the value of this property to `PipelineType.V2`. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| V2NEXT | `false` | `true` | + +**Compatibility with old behavior:** Pass `pipelineType: PipelineType.V1` to `Pipeline` construct to restore the previous behavior. + + diff --git a/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts b/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts index b8a0e732b18e3..eb38769453cdb 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts +++ b/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts @@ -195,7 +195,8 @@ export interface PipelineProps { /** * Type of the pipeline. * - * @default - PipelineType.V1 + * @default - PipelineType.V2 if the feature flag `CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2` + * is true, PipelineType.V1 otherwise * * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-types-planning.html */ @@ -489,11 +490,11 @@ export class Pipeline extends PipelineBase { assumedBy: new iam.ServicePrincipal('codepipeline.amazonaws.com'), }); - // TODO: Change the default value of `pipelineType` to V2 under a feature flag. - if (props.pipelineType === undefined) { + const isDefaultV2 = FeatureFlags.of(this).isEnabled(cxapi.CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2); + if (!isDefaultV2 && props.pipelineType === undefined) { Annotations.of(this).addWarningV2('@aws-cdk/aws-codepipeline:unspecifiedPipelineType', 'V1 pipeline type is implicitly selected when `pipelineType` is not set. If you want to use V2 type, set `PipelineType.V2`.'); } - this.pipelineType = props.pipelineType ?? PipelineType.V1; + this.pipelineType = props.pipelineType ?? (isDefaultV2 ? PipelineType.V2 : PipelineType.V1); this.codePipeline = new CfnPipeline(this, 'Resource', { artifactStore: Lazy.any({ produce: () => this.renderArtifactStoreProperty() }), @@ -502,7 +503,7 @@ export class Pipeline extends PipelineBase { disableInboundStageTransitions: Lazy.any({ produce: () => this.renderDisabledTransitions() }, { omitEmptyArray: true }), roleArn: this.role.roleArn, restartExecutionOnUpdate: props && props.restartExecutionOnUpdate, - pipelineType: props.pipelineType, + pipelineType: props.pipelineType ?? (isDefaultV2 ? PipelineType.V2 : undefined), variables: Lazy.any({ produce: () => this.renderVariables() }, { omitEmptyArray: true }), triggers: Lazy.any({ produce: () => this.renderTriggers() }, { omitEmptyArray: true }), name: this.physicalName, diff --git a/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts b/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts index e66cd9ddbb993..3fa8278d54033 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts +++ b/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts @@ -538,7 +538,8 @@ describe('', () => { test.each([ [codepipeline.PipelineType.V1, 'V1'], [codepipeline.PipelineType.V2, 'V2'], - ])('can specify pipeline type %s', (type, expected) => { + [undefined, Match.absent()], + ])('can specify pipeline type %s when feature flag is not set', (type, expected) => { const stack = new cdk.Stack(); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { pipelineType: type, @@ -559,6 +560,33 @@ describe('', () => { PipelineType: expected, }); }); + + test.each([ + [codepipeline.PipelineType.V1, 'V1'], + [codepipeline.PipelineType.V2, 'V2'], + [undefined, 'V2'], + ])('can specify pipeline type %s when feature flag is enabled', (type, expected) => { + const stack = new cdk.Stack(); + stack.node.setContext(cxapi.CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2, true); + const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { + pipelineType: type, + }); + + const sourceArtifact = new codepipeline.Artifact(); + const sourceActions = [new FakeSourceAction({ + actionName: 'FakeSource', + output: sourceArtifact, + })]; + const buildActions = [new FakeBuildAction({ + actionName: 'FakeBuild', + input: sourceArtifact, + })]; + testPipelineSetup(pipeline, sourceActions, buildActions); + + Template.fromStack(stack).hasResourceProperties('AWS::CodePipeline::Pipeline', { + PipelineType: expected, + }); + }); }); describe('cross account key alias name tests', () => { diff --git a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md index 4b3333f630a60..86bb8373fa803 100644 --- a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +++ b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md @@ -65,6 +65,7 @@ Flags come in three types: | [@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource](#aws-cdkaws-codepipeline-actionsusenewdefaultbranchforcodecommitsource) | When enabled, the CodeCommit source action is using the default branch name 'main'. | 2.103.1 | (fix) | | [@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction](#aws-cdkaws-cloudwatch-actionschangelambdapermissionlogicalidforlambdaaction) | When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID. | 2.124.0 | (fix) | | [@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse](#aws-cdkaws-codepipelinecrossaccountkeysdefaultvaluetofalse) | Enables Pipeline to set the default value for crossAccountKeys to false. | 2.127.0 | (default) | +| [@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2](#aws-cdkaws-codepipelinedefaultpipelinetypetov2) | Enables Pipeline to set the default pipeline type to V2. | V2NEXT | (default) | @@ -120,7 +121,8 @@ The following json shows the current recommended set of flags, as `cdk init` wou "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": true, "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true, "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": true, - "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": true, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true } } ``` @@ -1231,4 +1233,20 @@ construct, the construct automatically defaults the value of this property to fa **Compatibility with old behavior:** Pass `crossAccountKeys: true` to `Pipeline` construct to restore the previous behavior. +### @aws-cdk/aws-codepipeline:defaultPipelineTypeToV2 + +*Enables Pipeline to set the default pipeline type to V2.* (default) + +When this feature flag is enabled, and the `pipelineType` property is not provided in a `Pipeline` +construct, the construct automatically defaults the value of this property to `PipelineType.V2`. + + +| Since | Default | Recommended | +| ----- | ----- | ----- | +| (not in v1) | | | +| V2NEXT | `false` | `true` | + +**Compatibility with old behavior:** Pass `pipelineType: PipelineType.V1` to `Pipeline` construct to restore the previous behavior. + + diff --git a/packages/aws-cdk-lib/cx-api/README.md b/packages/aws-cdk-lib/cx-api/README.md index b93c709a1ee47..394a47009b24d 100644 --- a/packages/aws-cdk-lib/cx-api/README.md +++ b/packages/aws-cdk-lib/cx-api/README.md @@ -275,3 +275,20 @@ _cdk.json_ } } ``` + +* `@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2` + +Enables Pipeline to set the default pipeline type to V2. + +When this feature flag is enabled, and the `pipelineType` property is not provided in a `Pipeline` +construct, the construct automatically defaults the value of this property to `PipelineType.V2`. + +_cdk.json_ + +```json +{ + "context": { + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": true + } +} +``` diff --git a/packages/aws-cdk-lib/cx-api/lib/features.ts b/packages/aws-cdk-lib/cx-api/lib/features.ts index 72b96bf2e423e..28b15de29a57c 100644 --- a/packages/aws-cdk-lib/cx-api/lib/features.ts +++ b/packages/aws-cdk-lib/cx-api/lib/features.ts @@ -99,6 +99,7 @@ export const APPSYNC_ENABLE_USE_ARN_IDENTIFIER_SOURCE_API_ASSOCIATION = '@aws-cd export const CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME = '@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource'; export const LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION = '@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction'; export const CODEPIPELINE_CROSS_ACCOUNT_KEYS_DEFAULT_VALUE_TO_FALSE = '@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse'; +export const CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 = '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2'; export const FLAGS: Record = { ////////////////////////////////////////////////////////////////////// @@ -1007,6 +1008,19 @@ export const FLAGS: Record = { recommendedValue: true, compatibilityWithOldBehaviorMd: 'Pass `crossAccountKeys: true` to `Pipeline` construct to restore the previous behavior.', }, + + ////////////////////////////////////////////////////////////////////// + [CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2]: { + type: FlagType.ApiDefault, + summary: 'Enables Pipeline to set the default pipeline type to V2.', + detailsMd: ` + When this feature flag is enabled, and the \`pipelineType\` property is not provided in a \`Pipeline\` + construct, the construct automatically defaults the value of this property to \`PipelineType.V2\`. + `, + introducedIn: { v2: 'V2NEXT' }, + recommendedValue: true, + compatibilityWithOldBehaviorMd: 'Pass `pipelineType: PipelineType.V1` to `Pipeline` construct to restore the previous behavior.', + }, }; const CURRENT_MV = 'v2'; From fed918e0e031d68e2fd72010c4731d6d0513985f Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:22:42 +0900 Subject: [PATCH 02/20] integ test --- .../index.js | 1 + ...ne-pipeline-type-v2-by-default.assets.json | 32 + ...-pipeline-type-v2-by-default.template.json | 668 ++++++++++++ .../cdk.out | 1 + ...efaultTestDeployAssert9B55D727.assets.json | 19 + ...aultTestDeployAssert9B55D727.template.json | 36 + .../integ.json | 13 + .../manifest.json | 197 ++++ .../tree.json | 959 ++++++++++++++++++ .../test/integ.pipeline-type-v2-by-default.ts | 59 ++ 10 files changed, 1985 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3/index.js create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/tree.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3/index.js new file mode 100644 index 0000000000000..9d841e15260d7 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3/index.js @@ -0,0 +1 @@ +"use strict";var C=Object.create;var i=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e);var U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_});module.exports=k(U);var h=require("@aws-sdk/client-s3");var y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")}0&&(module.exports={autoDeleteHandler,handler}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json new file mode 100644 index 0000000000000..55b546e762310 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json @@ -0,0 +1,32 @@ +{ + "version": "36.0.0", + "files": { + "2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3": { + "source": { + "path": "asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3", + "packaging": "zip" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3.zip", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + }, + "66886bd8f1a19453a9d88ba798e6cc8193518e117a17e1e3f31f2d95a4b2acf3": { + "source": { + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "66886bd8f1a19453a9d88ba798e6cc8193518e117a17e1e3f31f2d95a4b2acf3.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json new file mode 100644 index 0000000000000..b6e7eb633d6f0 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json @@ -0,0 +1,668 @@ +{ + "Resources": { + "PipelineBucketB967BD35": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + } + ], + "VersioningConfiguration": { + "Status": "Enabled" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PipelineBucketPolicyD65CDEF5": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "PipelineBucketB967BD35" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*", + "s3:PutBucketPolicy" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineBucketAutoDeleteObjectsCustomResource5F37E165": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "PipelineBucketB967BD35" + } + }, + "DependsOn": [ + "PipelineBucketPolicyD65CDEF5" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ] + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + }, + "Runtime": "nodejs18.x", + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "PipelineBucketB967BD35" + }, + " S3 bucket." + ] + ] + } + }, + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + ] + }, + "DeployBucket67E2C076": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "DeployBucketPolicyCED076FF": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "DeployBucket67E2C076" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*", + "s3:PutBucketPolicy" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "DeployBucketAutoDeleteObjectsCustomResourceC751D9D5": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "DeployBucket67E2C076" + } + }, + "DependsOn": [ + "DeployBucketPolicyCED076FF" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "PipelineRoleD68726F7": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineRoleDefaultPolicyC7A05455": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineDeployDeployActionCodePipelineActionRole1C288A60", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "PipelineSourceCodePipelineActionRoleC6F9E7F5", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineRoleDefaultPolicyC7A05455", + "Roles": [ + { + "Ref": "PipelineRoleD68726F7" + } + ] + } + }, + "PipelineC660917D": { + "Type": "AWS::CodePipeline::Pipeline", + "Properties": { + "ArtifactStore": { + "Location": { + "Ref": "PipelineBucketB967BD35" + }, + "Type": "S3" + }, + "PipelineType": "V2", + "RoleArn": { + "Fn::GetAtt": [ + "PipelineRoleD68726F7", + "Arn" + ] + }, + "Stages": [ + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Source", + "Owner": "AWS", + "Provider": "S3", + "Version": "1" + }, + "Configuration": { + "S3Bucket": { + "Ref": "PipelineBucketB967BD35" + }, + "S3ObjectKey": "key" + }, + "Name": "Source", + "OutputArtifacts": [ + { + "Name": "SourceArtifact" + } + ], + "RoleArn": { + "Fn::GetAtt": [ + "PipelineSourceCodePipelineActionRoleC6F9E7F5", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "Source" + }, + { + "Actions": [ + { + "ActionTypeId": { + "Category": "Deploy", + "Owner": "AWS", + "Provider": "S3", + "Version": "1" + }, + "Configuration": { + "BucketName": { + "Ref": "DeployBucket67E2C076" + }, + "Extract": "false", + "ObjectKey": "test.txt" + }, + "InputArtifacts": [ + { + "Name": "SourceArtifact" + } + ], + "Name": "DeployAction", + "RoleArn": { + "Fn::GetAtt": [ + "PipelineDeployDeployActionCodePipelineActionRole1C288A60", + "Arn" + ] + }, + "RunOrder": 1 + } + ], + "Name": "Deploy" + } + ] + }, + "DependsOn": [ + "PipelineRoleDefaultPolicyC7A05455", + "PipelineRoleD68726F7" + ] + }, + "PipelineSourceCodePipelineActionRoleC6F9E7F5": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/key" + ] + ] + } + ] + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", + "Roles": [ + { + "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" + } + ] + } + }, + "PipelineDeployDeployActionCodePipelineActionRole1C288A60": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B", + "Roles": [ + { + "Ref": "PipelineDeployDeployActionCodePipelineActionRole1C288A60" + } + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json new file mode 100644 index 0000000000000..7ba3edf507c43 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/integ.json new file mode 100644 index 0000000000000..791dae1500331 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/integ.json @@ -0,0 +1,13 @@ +{ + "version": "36.0.0", + "testCases": { + "codepipeline-pipeline-type-v2-by-default-test/DefaultTest": { + "stacks": [ + "aws-cdk-codepipeline-pipeline-type-v2-by-default" + ], + "diffAssets": true, + "assertionStack": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert", + "assertionStackName": "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json new file mode 100644 index 0000000000000..0affb6fd44038 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json @@ -0,0 +1,197 @@ +{ + "version": "36.0.0", + "artifacts": { + "aws-cdk-codepipeline-pipeline-type-v2-by-default.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "aws-cdk-codepipeline-pipeline-type-v2-by-default": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/66886bd8f1a19453a9d88ba798e6cc8193518e117a17e1e3f31f2d95a4b2acf3.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "aws-cdk-codepipeline-pipeline-type-v2-by-default.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "aws-cdk-codepipeline-pipeline-type-v2-by-default.assets" + ], + "metadata": { + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBucketB967BD35" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBucketPolicyD65CDEF5" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/AutoDeleteObjectsCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineBucketAutoDeleteObjectsCustomResource5F37E165" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler": [ + { + "type": "aws:cdk:logicalId", + "data": "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployBucket67E2C076" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Policy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployBucketPolicyCED076FF" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/AutoDeleteObjectsCustomResource/Default": [ + { + "type": "aws:cdk:logicalId", + "data": "DeployBucketAutoDeleteObjectsCustomResourceC751D9D5" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineRoleD68726F7" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineRoleDefaultPolicyC7A05455" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineC660917D" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineSourceCodePipelineActionRoleC6F9E7F5" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineDeployDeployActionCodePipelineActionRole1C288A60" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/DefaultPolicy/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/aws-cdk-codepipeline-pipeline-type-v2-by-default/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "aws-cdk-codepipeline-pipeline-type-v2-by-default" + }, + "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "codepipelinepipelinetypev2bydefaulttestDefaultTestDeployAssert9B55D727.assets" + ], + "metadata": { + "/codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/tree.json new file mode 100644 index 0000000000000..f4fa4d1f225ef --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/tree.json @@ -0,0 +1,959 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "aws-cdk-codepipeline-pipeline-type-v2-by-default": { + "id": "aws-cdk-codepipeline-pipeline-type-v2-by-default", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default", + "children": { + "PipelineBucket": { + "id": "PipelineBucket", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "aws-cdk:auto-delete-objects", + "value": "true" + } + ], + "versioningConfiguration": { + "status": "Enabled" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Policy": { + "id": "Policy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "PipelineBucketB967BD35" + }, + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*", + "s3:PutBucketPolicy" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "AutoDeleteObjectsCustomResource": { + "id": "AutoDeleteObjectsCustomResource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/AutoDeleteObjectsCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/PipelineBucket/AutoDeleteObjectsCustomResource/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Custom::S3AutoDeleteObjectsCustomResourceProvider": { + "id": "Custom::S3AutoDeleteObjectsCustomResourceProvider", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider", + "children": { + "Staging": { + "id": "Staging", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Role": { + "id": "Role", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Handler": { + "id": "Handler", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployBucket": { + "id": "DeployBucket", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::Bucket", + "aws:cdk:cloudformation:props": { + "tags": [ + { + "key": "aws-cdk:auto-delete-objects", + "value": "true" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Policy": { + "id": "Policy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Policy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/Policy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::S3::BucketPolicy", + "aws:cdk:cloudformation:props": { + "bucket": { + "Ref": "DeployBucket67E2C076" + }, + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:List*", + "s3:PutBucketPolicy" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "AutoDeleteObjectsCustomResource": { + "id": "AutoDeleteObjectsCustomResource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/AutoDeleteObjectsCustomResource", + "children": { + "Default": { + "id": "Default", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/DeployBucket/AutoDeleteObjectsCustomResource/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Pipeline": { + "id": "Pipeline", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline", + "children": { + "Role": { + "id": "Role", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role", + "children": { + "ImportRole": { + "id": "ImportRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/ImportRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codepipeline.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Role/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineDeployDeployActionCodePipelineActionRole1C288A60", + "Arn" + ] + }, + { + "Fn::GetAtt": [ + "PipelineSourceCodePipelineActionRoleC6F9E7F5", + "Arn" + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineRoleDefaultPolicyC7A05455", + "roles": [ + { + "Ref": "PipelineRoleD68726F7" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CodePipeline::Pipeline", + "aws:cdk:cloudformation:props": { + "artifactStore": { + "type": "S3", + "location": { + "Ref": "PipelineBucketB967BD35" + } + }, + "pipelineType": "V2", + "roleArn": { + "Fn::GetAtt": [ + "PipelineRoleD68726F7", + "Arn" + ] + }, + "stages": [ + { + "name": "Source", + "actions": [ + { + "name": "Source", + "outputArtifacts": [ + { + "name": "SourceArtifact" + } + ], + "actionTypeId": { + "category": "Source", + "version": "1", + "owner": "AWS", + "provider": "S3" + }, + "configuration": { + "S3Bucket": { + "Ref": "PipelineBucketB967BD35" + }, + "S3ObjectKey": "key" + }, + "runOrder": 1, + "roleArn": { + "Fn::GetAtt": [ + "PipelineSourceCodePipelineActionRoleC6F9E7F5", + "Arn" + ] + } + } + ] + }, + { + "name": "Deploy", + "actions": [ + { + "name": "DeployAction", + "inputArtifacts": [ + { + "name": "SourceArtifact" + } + ], + "actionTypeId": { + "category": "Deploy", + "version": "1", + "owner": "AWS", + "provider": "S3" + }, + "configuration": { + "BucketName": { + "Ref": "DeployBucket67E2C076" + }, + "Extract": "false", + "ObjectKey": "test.txt" + }, + "runOrder": 1, + "roleArn": { + "Fn::GetAtt": [ + "PipelineDeployDeployActionCodePipelineActionRole1C288A60", + "Arn" + ] + } + } + ] + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Source": { + "id": "Source", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source", + "children": { + "Source": { + "id": "Source", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source", + "children": { + "CodePipelineActionRole": { + "id": "CodePipelineActionRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole", + "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Source/Source/CodePipelineActionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/key" + ] + ] + } + ] + }, + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineSourceCodePipelineActionRoleDefaultPolicy2D565925", + "roles": [ + { + "Ref": "PipelineSourceCodePipelineActionRoleC6F9E7F5" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Deploy": { + "id": "Deploy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy", + "children": { + "DeployAction": { + "id": "DeployAction", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction", + "children": { + "CodePipelineActionRole": { + "id": "CodePipelineActionRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole", + "children": { + "ImportCodePipelineActionRole": { + "id": "ImportCodePipelineActionRole", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/ImportCodePipelineActionRole", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Role", + "aws:cdk:cloudformation:props": { + "assumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::", + { + "Ref": "AWS::AccountId" + }, + ":root" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DefaultPolicy": { + "id": "DefaultPolicy", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/DefaultPolicy", + "children": { + "Resource": { + "id": "Resource", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/Pipeline/Deploy/DeployAction/CodePipelineActionRole/DefaultPolicy/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::Policy", + "aws:cdk:cloudformation:props": { + "policyDocument": { + "Statement": [ + { + "Action": [ + "s3:Abort*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "DeployBucket67E2C076", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetBucket*", + "s3:GetObject*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "PipelineBucketB967BD35", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "policyName": "PipelineDeployDeployActionCodePipelineActionRoleDefaultPolicyE194961B", + "roles": [ + { + "Ref": "PipelineDeployDeployActionCodePipelineActionRole1C288A60" + } + ] + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "codepipeline-pipeline-type-v2-by-default-test": { + "id": "codepipeline-pipeline-type-v2-by-default-test", + "path": "codepipeline-pipeline-type-v2-by-default-test", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "codepipeline-pipeline-type-v2-by-default-test/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.ts new file mode 100644 index 0000000000000..d67861aa23e68 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.ts @@ -0,0 +1,59 @@ +import * as cdk from 'aws-cdk-lib'; +import * as codepipeline from 'aws-cdk-lib/aws-codepipeline'; +import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; +import * as s3 from 'aws-cdk-lib/aws-s3'; +import { CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2 } from 'aws-cdk-lib/cx-api'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-pipeline-type-v2-by-default'); +stack.node.setContext(CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2, true); + +const sourceBucket = new s3.Bucket(stack, 'PipelineBucket', { + versioned: true, + removalPolicy: cdk.RemovalPolicy.DESTROY, + autoDeleteObjects: true, +}); +const sourceOutput = new codepipeline.Artifact('SourceArtifact'); +const sourceAction = new cpactions.S3SourceAction({ + actionName: 'Source', + output: sourceOutput, + bucket: sourceBucket, + bucketKey: 'key', +}); + +const deployBucket = new s3.Bucket(stack, 'DeployBucket', { + removalPolicy: cdk.RemovalPolicy.DESTROY, + autoDeleteObjects: true, +}); + +new codepipeline.Pipeline(stack, 'Pipeline', { + artifactBucket: sourceBucket, + // pipelineType: codepipeline.PipelineType.V2, // V2 is set by default when the feature flag is enabled + stages: [ + { + stageName: 'Source', + actions: [sourceAction], + }, + { + stageName: 'Deploy', + actions: [ + new cpactions.S3DeployAction({ + actionName: 'DeployAction', + extract: false, + objectKey: 'test.txt', + input: sourceOutput, + bucket: deployBucket, + }), + ], + }, + ], +}); + +new IntegTest(app, 'codepipeline-pipeline-type-v2-by-default-test', { + testCases: [stack], + diffAssets: true, +}); + +app.synth(); From aeca2c8492fc2421ef3101bc20c2d4c21e844149 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:47:07 +0900 Subject: [PATCH 03/20] change existing integ tests --- .../test/cloudformation/integ.stacksets.ts | 6 +++++- .../test/integ.lambda-pipeline.ts | 6 +++++- .../test/integ.pipeline-alexa-deploy.ts | 7 +++++-- .../test/integ.pipeline-cfn-cross-region.ts | 6 +++++- .../test/integ.pipeline-cfn-with-action-role.ts | 6 +++++- .../test/integ.pipeline-cfn.ts | 6 +++++- .../test/integ.pipeline-code-build-batch.ts | 6 +++++- ...teg.pipeline-code-build-multiple-inputs-outputs.ts | 6 +++++- .../test/integ.pipeline-code-commit-build.ts | 6 +++++- .../test/integ.pipeline-code-commit-custom-event.ts | 9 ++++++--- .../test/integ.pipeline-code-commit-main.ts | 9 ++++++--- .../test/integ.pipeline-code-commit.ts | 11 ++++++----- .../test/integ.pipeline-code-deploy-ecs.ts | 6 +++++- .../test/integ.pipeline-code-deploy.ts | 6 +++++- .../test/integ.pipeline-ecr-source.ts | 6 +++++- .../test/integ.pipeline-ecs-deploy.ts | 6 +++++- .../test/integ.pipeline-elastic-beanstalk-deploy.ts | 6 +++++- .../test/integ.pipeline-events.ts | 6 +++++- .../test/integ.pipeline-jenkins.ts | 6 +++++- .../test/integ.pipeline-manual-approval.ts | 6 +++++- .../test/integ.pipeline-s3-deploy.ts | 6 +++++- .../test/integ.pipeline-stepfunctions.ts | 6 +++++- .../test/integ.pipeline-with-replication.ts | 3 +++ ...integ.source-bucket-events-cross-stack-same-env.ts | 6 +++++- .../test/codepipeline/integ.pipeline-event-target.ts | 6 +++++- .../test/integ.newpipeline-with-codebuild-logging.ts | 1 + .../test/integ.newpipeline-with-cross-account-keys.ts | 7 +++++-- ...wpipeline-with-cross-region-replication-buckets.ts | 1 + .../integ.newpipeline-with-file-system-locations.ts | 1 + .../test/pipelines/test/integ.newpipeline-with-vpc.ts | 1 + .../test/pipelines/test/integ.newpipeline.ts | 1 + .../test/pipelines/test/integ.pipeline-security.ts | 1 + .../test/integ.pipeline-with-artifact-bucket.ts | 1 + .../test/integ.pipeline-with-assets-single-upload.ts | 1 + .../test/pipelines/test/integ.pipeline-with-assets.ts | 1 + ...nteg.pipeline-with-stack-outputs-in-custom-step.ts | 1 + .../pipelines/test/integ.pipeline-with-variables.ts | 1 + .../pipelines/test/integ.pipeline-without-prepare.ts | 1 + .../test/pipelines/test/integ.pipeline.ts | 1 + .../test/integ.cfn-template-from-repo.lit.ts | 6 +++++- .../integ.lambda-deployed-through-codepipeline.lit.ts | 6 +++++- 41 files changed, 154 insertions(+), 37 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts index 18d2d521e25be..e5b6b8a8d4f98 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts @@ -76,7 +76,11 @@ export class StackSetPipelineStack extends Stack { } } -const app = new App(); +const app = new App({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new StackSetPipelineStack(app, 'StackSetPipelineStack'); new IntegTest(app, 'StackSetPipelineStackInteg', { testCases: [stack], diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts index f21ea308ce0b4..5f2e88f165150 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-lambda'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts index 9311a8972a658..efcd98f54a7d4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new Stack(app, 'aws-cdk-codepipeline-alexa-deploy'); const bucket = new s3.Bucket(stack, 'PipelineBucket', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts index c17b22d81066b..bb47cad51b5c9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts @@ -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({ + context: { + '@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', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts index 52d53fd87efd7..716d762eec2a4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation-cross-region-with-action-role', {}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts index 5086cf2df3926..773c9b43f08ab 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts index 3da6c4609cced..047aca1f4b781 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codebuild-batch'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts index 81458ec6ed0ca..97ff81b919850 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codebuild-multiple-inputs-outputs'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts index fbbaed9b5bdcc..3c0fd5135e8e8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codecommit-codebuild'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts index b0ae60e70e3f8..60d76a400090d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-custom-event.ts @@ -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'; diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts index 1d5db2cc3e5f4..e007cc83da8db 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-main.ts @@ -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'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts index 80db251c1bfc5..cac2ce690b4fe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit.ts @@ -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'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts index 64918283d95e6..fdc8a8fbf3b05 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codedeploy-ecs'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts index c285bf36e9c11..d8eb0b8dc71e1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-codedeploy'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts index ec5f23a5dccf6..de816914f13ae 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-ecr-source'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts index ab47c1cfaba06..899b72a592d9f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-ecs-deploy'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts index 32b44ba03f8d3..d66e920b3b2f6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new Stack(app, 'aws-cdk-codepipeline-elastic-beanstalk-deploy'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts index f85004e2febb6..e83b54b4378f8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-pipeline-event-target'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts index 32bbe67756c6e..063ab587eb55e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-jenkins'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts index 92c3569697ffc..09b15892cf354 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-manual-approval'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts index 8bd92c8896177..0c4f5f536a521 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-s3-deploy'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts index 400f8b023b168..cd0a9e639be95 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts @@ -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({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-stepfunctions'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts index 816a548bc8675..0ee09afb76c25 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts @@ -8,6 +8,9 @@ import { S3SourceAction, CodeBuildAction } from 'aws-cdk-lib/aws-codepipeline-ac const app = new App({ treeMetadata: false, + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, }); const stack1 = new Stack(app, 'integ-pipeline-producer-stack', { env: { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts index 1ef92d1cc1594..a0df90179c50b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts @@ -7,7 +7,11 @@ import { App, RemovalPolicy, Stack } from 'aws-cdk-lib'; import * as integ from '@aws-cdk/integ-tests-alpha'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; -const app = new App(); +const app = new App({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const bucketStack = new Stack(app, 'BucketStack'); const bucket = new s3.Bucket(bucketStack, 'Bucket', { removalPolicy: RemovalPolicy.DESTROY, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts index 59276b644b7e3..bef236b1923f3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts @@ -31,7 +31,11 @@ class MockAction implements codepipeline.IAction { } } -const app = new cdk.App(); +const app = new cdk.App({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'pipeline-events'); const repo = new codecommit.Repository(stack, 'Repo', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts index f6959d9bcedc9..a12ba71e3ab63 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts @@ -70,6 +70,7 @@ class AppStage extends Stage { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts index 853f0d2805f19..33f63dad1675c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts @@ -53,8 +53,11 @@ class AppStage extends Stage { } } -const app = new App(); - +const app = new App({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new PipelineStack(app, 'PipelineStack'); new integ.IntegTest(app, 'LambdaTest', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts index ce91fd3fad3f4..92708fdd3d2b6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts @@ -75,6 +75,7 @@ class AppStage extends Stage { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts index 68ccb872e5937..7651435a9ef1e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts @@ -60,6 +60,7 @@ class AppStage extends Stage { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts index 49d081b3e5e52..d769c9395585d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts @@ -49,6 +49,7 @@ class AppStage extends Stage { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); new PipelineStack(app, 'PipelineStack'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts index 258b3e80d1bdc..bd0e4cd521078 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts @@ -54,6 +54,7 @@ class AppStage extends Stage { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); new PipelineStack(app, 'PipelineStack'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts index ea7951477ee76..8dfd4c37e6141 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts @@ -100,6 +100,7 @@ export class TestCdkStack extends Stack { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': 'true', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); const stack = new TestCdkStack(app, 'PipelineSecurityStack', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts index b25a47dac2313..2f30bfc0f35fd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts @@ -29,6 +29,7 @@ class PipelineStack extends Stack { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); const stack = new PipelineStack(app, 'PipelineStack'); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts index fce31b49d8fad..b32ccbce568e6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts @@ -92,6 +92,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': 'true', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); const stack = new CdkpipelinesDemoPipelineStack(app, 'PipelineStack', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts index b8e89daa977fb..cb1cd1750532e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts @@ -91,6 +91,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': 'true', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); const stack = new CdkpipelinesDemoPipelineStack(app, 'PipelineStack', { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts index f97495ba39538..2008684dd046d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts @@ -80,6 +80,7 @@ class PipelineStack extends Stack { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts index c47217e3cdaca..4b0640e80192f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts @@ -53,6 +53,7 @@ class PipelineStack extends Stack { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts index 80e19e2e0e345..d9f1d28f43477 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts @@ -67,6 +67,7 @@ class PipelineStack extends Stack { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': '1', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts index fd7c1e4500354..20092a1718a28 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts @@ -81,6 +81,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { const app = new App({ context: { '@aws-cdk/core:newStyleStackSynthesis': 'true', + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 0c934b12c5ce9..885b99a18ef01 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -3,7 +3,11 @@ import * as codepipeline from '../../aws-codepipeline'; import * as cdk from '../../core'; import * as cpactions from '../lib'; -const app = new cdk.App(); +const app = new cdk.App({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new cdk.Stack(app, 'aws-cdk-codepipeline-cloudformation'); /// !show diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 7c7873bf5badb..4a1b19176a848 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -6,7 +6,11 @@ import * as lambda from '../../aws-lambda'; import * as cdk from '../../core'; import * as codepipeline_actions from '../lib'; -const app = new cdk.App(); +const app = new cdk.App({ + context: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); /// !show const lambdaStack = new cdk.Stack(app, 'LambdaStack'); From 96dbaad6d4bb4528901e25e472c7fcc7224c04bb Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 14 Feb 2024 15:49:36 +0900 Subject: [PATCH 04/20] postCliContext --- .../test/cloudformation/integ.stacksets.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts | 2 +- .../test/integ.pipeline-alexa-deploy.ts | 2 +- .../test/integ.pipeline-cfn-cross-region.ts | 2 +- .../test/integ.pipeline-cfn-with-action-role.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts | 2 +- .../test/integ.pipeline-code-build-batch.ts | 2 +- .../test/integ.pipeline-code-build-multiple-inputs-outputs.ts | 2 +- .../test/integ.pipeline-code-commit-build.ts | 2 +- .../test/integ.pipeline-code-deploy-ecs.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts | 2 +- .../test/integ.pipeline-elastic-beanstalk-deploy.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.pipeline-events.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-jenkins.ts | 2 +- .../test/integ.pipeline-manual-approval.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts | 2 +- .../test/integ.pipeline-stepfunctions.ts | 2 +- .../test/integ.pipeline-with-replication.ts | 2 +- .../test/s3/integ.source-bucket-events-cross-stack-same-env.ts | 2 +- .../test/codepipeline/integ.pipeline-event-target.ts | 2 +- .../pipelines/test/integ.newpipeline-with-codebuild-logging.ts | 2 +- .../pipelines/test/integ.newpipeline-with-cross-account-keys.ts | 2 +- .../integ.newpipeline-with-cross-region-replication-buckets.ts | 2 +- .../test/integ.newpipeline-with-file-system-locations.ts | 2 +- .../test/pipelines/test/integ.newpipeline-with-vpc.ts | 2 +- .../framework-integ/test/pipelines/test/integ.newpipeline.ts | 2 +- .../test/pipelines/test/integ.pipeline-security.ts | 2 +- .../test/pipelines/test/integ.pipeline-with-artifact-bucket.ts | 2 +- .../pipelines/test/integ.pipeline-with-assets-single-upload.ts | 2 +- .../test/pipelines/test/integ.pipeline-with-assets.ts | 2 +- .../test/integ.pipeline-with-stack-outputs-in-custom-step.ts | 2 +- .../test/pipelines/test/integ.pipeline-with-variables.ts | 2 +- .../test/pipelines/test/integ.pipeline-without-prepare.ts | 2 +- .../framework-integ/test/pipelines/test/integ.pipeline.ts | 2 +- .../test/integ.cfn-template-from-repo.lit.ts | 2 +- .../test/integ.lambda-deployed-through-codepipeline.lit.ts | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts index e5b6b8a8d4f98..85972dc67f432 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts @@ -77,7 +77,7 @@ export class StackSetPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts index 5f2e88f165150..269e150371f62 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts @@ -7,7 +7,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; import { STANDARD_NODEJS_RUNTIME } from '../../config'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts index efcd98f54a7d4..513ee5e7a85e9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts @@ -4,7 +4,7 @@ import { App, RemovalPolicy, SecretValue, Stack } from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts index bb47cad51b5c9..b978eee5ba3b9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts index 716d762eec2a4..c657b0d3c9205 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts index 773c9b43f08ab..b670dc5dd39f8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts index 047aca1f4b781..d1897f4561fd9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts @@ -6,7 +6,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts index 97ff81b919850..cd2b2d3404a39 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts @@ -6,7 +6,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts index 3c0fd5135e8e8..2c9adf022da21 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts @@ -7,7 +7,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; /* eslint-disable quote-props */ const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts index fdc8a8fbf3b05..c9b7ef7f5331c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts index d8eb0b8dc71e1..a151c41a08e86 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts index de816914f13ae..2dbdbfc0c5e90 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts @@ -25,7 +25,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; */ const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts index 899b72a592d9f..867a78ccb5e43 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts @@ -10,7 +10,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; /* eslint-disable quote-props */ const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts index d66e920b3b2f6..ff19f0342c7b5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts @@ -22,7 +22,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; */ const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts index e83b54b4378f8..badaf54589e7f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts @@ -10,7 +10,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts index 063ab587eb55e..3b3de3226380b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts index 09b15892cf354..766ecd6381230 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts index 0c4f5f536a521..1e4f2192519b6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts @@ -7,7 +7,7 @@ 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({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts index cd0a9e639be95..1c02051327ffc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts index 0ee09afb76c25..2947d24b0eb6f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts @@ -8,7 +8,7 @@ import { S3SourceAction, CodeBuildAction } from 'aws-cdk-lib/aws-codepipeline-ac const app = new App({ treeMetadata: false, - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts index a0df90179c50b..ab6db0b2219f2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts @@ -8,7 +8,7 @@ import * as integ from '@aws-cdk/integ-tests-alpha'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts index bef236b1923f3..198ee0fc9dafe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts @@ -32,7 +32,7 @@ class MockAction implements codepipeline.IAction { } const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts index a12ba71e3ab63..637b794f5e43a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts @@ -68,7 +68,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts index 33f63dad1675c..c2648fd90d748 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts @@ -54,7 +54,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts index 92708fdd3d2b6..579d9a3a02f90 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts @@ -73,7 +73,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts index 7651435a9ef1e..99499134a6ff6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts @@ -58,7 +58,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts index d769c9395585d..9d4baa745ee4b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts @@ -47,7 +47,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts index bd0e4cd521078..2434b94f5e3d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts @@ -52,7 +52,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts index 8dfd4c37e6141..82870e7515ffa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts @@ -98,7 +98,7 @@ export class TestCdkStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts index 2f30bfc0f35fd..a06d3bb34b83e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts @@ -27,7 +27,7 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts index b32ccbce568e6..c05a52e685eba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts @@ -90,7 +90,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts index cb1cd1750532e..3c71922e1e02d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts @@ -89,7 +89,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts index 2008684dd046d..bdaf4211e6e55 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts @@ -78,7 +78,7 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts index 4b0640e80192f..fb2b395070275 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts @@ -51,7 +51,7 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts index d9f1d28f43477..58a19c2e3d901 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts @@ -65,7 +65,7 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts index 20092a1718a28..b8afeedfc285d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts @@ -79,7 +79,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 885b99a18ef01..0811d85c5e127 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -4,7 +4,7 @@ import * as cdk from '../../core'; import * as cpactions from '../lib'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 4a1b19176a848..a00d835d17e25 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -7,7 +7,7 @@ import * as cdk from '../../core'; import * as codepipeline_actions from '../lib'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); From 9c809452609116cd04cc24bd3a6767ed46f6f455 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:20:55 +0900 Subject: [PATCH 05/20] add to change rest integ tests --- .../test/integ.cfn-template-from-repo.lit.ts | 6 +++++- .../test/integ.lambda-deployed-through-codepipeline.lit.ts | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 7a9c9e681ba91..6dc0545738ee4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -3,7 +3,11 @@ 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'; -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'); /// !show diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 063d3b5d87ff0..f74a7a480a7e6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -7,7 +7,11 @@ import * as cdk from 'aws-cdk-lib'; import * as codepipeline_actions 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, + }, +}); /// !show const lambdaStack = new cdk.Stack(app, 'LambdaStack'); From dc60a165b1f6e5ea9ccff921bfcbd7ec8361ce95 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:43:08 +0900 Subject: [PATCH 06/20] appconfig integ --- .../aws-appconfig-alpha/test/integ.configuration.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts index 6b7f0aeaf81df..a25287b7bf31a 100644 --- a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts @@ -32,7 +32,11 @@ def handler(event, context): print('This is my dummy validator') `; -const app = new App(); +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new Stack(app, 'aws-appconfig-configuration'); From 5e7e47b6f442df3ec63c84351ae15f28a327771d Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:29:26 +0900 Subject: [PATCH 07/20] integ.codepipeline-start-pipeline-execution.ts --- .../test/integ.codepipeline-start-pipeline-execution.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts index f67bb7ea009c5..35e160a7892ed 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts @@ -17,7 +17,11 @@ import { CodePipelineStartPipelineExecution } from '../lib/codepipeline-start-pi * 2. The pipeline has a step function action that updates the Parameter 'MyParameter' from value '🌧️' to '🌈': * 3. The pipeline is invoked by the scheduler every minute (but it needs only one successful execution to pass). */ -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-scheduler-targets-codepipeline-start-pipeline-execution'); const payload = { From a28c54812583525183367950f81cd2d33c4c4f12 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Sun, 3 Mar 2024 18:44:51 +0900 Subject: [PATCH 08/20] README --- packages/aws-cdk-lib/aws-codepipeline/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/aws-cdk-lib/aws-codepipeline/README.md b/packages/aws-cdk-lib/aws-codepipeline/README.md index b8606108507bc..bddbeb7412da5 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/README.md +++ b/packages/aws-cdk-lib/aws-codepipeline/README.md @@ -637,6 +637,9 @@ pipeline.addTrigger({ To migrate your pipeline type from V1 to V2, you just need to update the `pipelineType` property to `PipelineType.V2`. This migration does not cause replacement of your pipeline. +When the `@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2` feature flag is set to `true` (default for new projects), +the V2 type is selected by default. Otherwise, the V1 type is selected. + ```ts new codepipeline.Pipeline(this, 'Pipeline', { pipelineType: codepipeline.PipelineType.V2, // here From 599243b8633dc2ac4d2dec20a3db823f18e948d1 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Mon, 11 Mar 2024 16:12:23 +0900 Subject: [PATCH 09/20] change unit tests --- .../aws-codepipeline/test/pipeline.test.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts b/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts index c839a04c3b938..29587bb657421 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts +++ b/packages/aws-cdk-lib/aws-codepipeline/test/pipeline.test.ts @@ -535,6 +535,32 @@ describe('', () => { }); }); + test.each([ + [codepipeline.PipelineType.V1, 'V1'], + [codepipeline.PipelineType.V2, 'V2'], + [undefined, Match.absent()], + ])('can specify pipeline type %s when feature flag is not set', (type, expected) => { + const stack = new cdk.Stack(); + const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { + pipelineType: type, + }); + + const sourceArtifact = new codepipeline.Artifact(); + const sourceActions = [new FakeSourceAction({ + actionName: 'FakeSource', + output: sourceArtifact, + })]; + const buildActions = [new FakeBuildAction({ + actionName: 'FakeBuild', + input: sourceArtifact, + })]; + testPipelineSetup(pipeline, sourceActions, buildActions); + + Template.fromStack(stack).hasResourceProperties('AWS::CodePipeline::Pipeline', { + PipelineType: expected, + }); + }); + test.each([ [codepipeline.PipelineType.V1, 'V1'], [codepipeline.PipelineType.V2, 'V2'], From 3724ba6ee574af49c878f56b12d6d89372314f86 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:12:28 +0900 Subject: [PATCH 10/20] aws-appconfig/test/integ.configuration --- .../test/aws-appconfig/test/integ.configuration.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts index fff2fb369f76a..eb77c8f596506 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts @@ -32,7 +32,11 @@ def handler(event, context): print('This is my dummy validator') `; -const app = new App(); +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new Stack(app, 'aws-appconfig-configuration'); From ae27b584e871288ff89d5405c19f0c29ada626e5 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:12:55 +0900 Subject: [PATCH 11/20] integ.pipeline-type-v2-by-default --- .../index.js | 1 - .../index.js | 1 + ...odepipeline-pipeline-type-v2-by-default.assets.json | 10 +++++----- ...epipeline-pipeline-type-v2-by-default.template.json | 2 +- .../manifest.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3/index.js create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c/index.js diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3/index.js deleted file mode 100644 index 9d841e15260d7..0000000000000 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var C=Object.create;var i=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var L=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!A.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(r=I(t,s))||r.enumerable});return e};var l=(e,t,o)=>(o=e!=null?C(P(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),k=e=>d(i({},"__esModule",{value:!0}),e);var U={};L(U,{autoDeleteHandler:()=>S,handler:()=>_});module.exports=k(U);var h=require("@aws-sdk/client-s3");var y=l(require("https")),m=l(require("url")),a={sendHttpRequest:T,log:b,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",B="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let r={...t,ResponseURL:"..."};if(a.log(JSON.stringify(r,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(r,o),n=D(t,s);await u("SUCCESS",n)}catch(s){let n={...t,Reason:a.includeStackTraces?s.stack:s.message};n.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),n.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",n)}}}function D(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||B,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data};a.log("submit response to cloudformation",o);let r=JSON.stringify(o),s=m.parse(t.ResponseURL),n={hostname:s.hostname,path:s.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await O({attempts:5,sleep:1e3},a.sendHttpRequest)(n,r)}async function T(e,t){return new Promise((o,r)=>{try{let s=y.request(e,n=>o());s.on("error",r),s.write(t),s.end()}catch(s){r(s)}})}function b(e,...t){console.log(e,...t)}function O(e,t){return async(...o)=>{let r=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(n){if(r--<=0)throw n;await x(Math.floor(Math.random()*s)),s*=2}}}async function x(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",H=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return F(e);case"Delete":return f(e.ResourceProperties?.BucketName)}}async function F(e){let t=e,o=t.OldResourceProperties?.BucketName,r=t.ResourceProperties?.BucketName;if(r!=null&&o!=null&&r!==o)return f(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??H,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function E(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let r=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:r}}),t?.IsTruncated&&await E(e)}async function f(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await E(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")}0&&(module.exports={autoDeleteHandler,handler}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c/index.js b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c/index.js new file mode 100644 index 0000000000000..01a89b9921608 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c/index.js @@ -0,0 +1 @@ +"use strict";var I=Object.create;var i=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var k=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of P(t))!L.call(e,s)&&s!==o&&i(e,s,{get:()=>t[s],enumerable:!(n=w(t,s))||n.enumerable});return e};var l=(e,t,o)=>(o=e!=null?I(A(e)):{},d(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),B=e=>d(i({},"__esModule",{value:!0}),e);var q={};k(q,{autoDeleteHandler:()=>S,handler:()=>_});module.exports=B(q);var h=require("@aws-sdk/client-s3");var y=l(require("https")),m=l(require("url")),a={sendHttpRequest:b,log:O,includeStackTraces:!0,userHandlerIndex:"./index"},p="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",D="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";function R(e){return async(t,o)=>{let n={...t,ResponseURL:"..."};if(a.log(JSON.stringify(n,void 0,2)),t.RequestType==="Delete"&&t.PhysicalResourceId===p){a.log("ignoring DELETE event caused by a failed CREATE event"),await u("SUCCESS",t);return}try{let s=await e(n,o),r=T(t,s);await u("SUCCESS",r)}catch(s){let r={...t,Reason:a.includeStackTraces?s.stack:s.message};r.PhysicalResourceId||(t.RequestType==="Create"?(a.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),r.PhysicalResourceId=p):a.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(t)}`)),await u("FAILED",r)}}}function T(e,t={}){let o=t.PhysicalResourceId??e.PhysicalResourceId??e.RequestId;if(e.RequestType==="Delete"&&o!==e.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${e.PhysicalResourceId}" to "${t.PhysicalResourceId}" during deletion`);return{...e,...t,PhysicalResourceId:o}}async function u(e,t){let o={Status:e,Reason:t.Reason??e,StackId:t.StackId,RequestId:t.RequestId,PhysicalResourceId:t.PhysicalResourceId||D,LogicalResourceId:t.LogicalResourceId,NoEcho:t.NoEcho,Data:t.Data},n=m.parse(t.ResponseURL),s=`${n.protocol}//${n.hostname}/${n.pathname}?***`;a.log("submit response to cloudformation",s,o);let r=JSON.stringify(o),C={hostname:n.hostname,path:n.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(r,"utf8")}};await x({attempts:5,sleep:1e3},a.sendHttpRequest)(C,r)}async function b(e,t){return new Promise((o,n)=>{try{let s=y.request(e,r=>{r.resume(),!r.statusCode||r.statusCode>=400?n(new Error(`Unsuccessful HTTP response: ${r.statusCode}`)):o()});s.on("error",n),s.write(t),s.end()}catch(s){n(s)}})}function O(e,...t){console.log(e,...t)}function x(e,t){return async(...o)=>{let n=e.attempts,s=e.sleep;for(;;)try{return await t(...o)}catch(r){if(n--<=0)throw r;await H(Math.floor(Math.random()*s)),s*=2}}}async function H(e){return new Promise(t=>setTimeout(t,e))}var g="aws-cdk:auto-delete-objects",F=JSON.stringify({Version:"2012-10-17",Statement:[]}),c=new h.S3({}),_=R(S);async function S(e){switch(e.RequestType){case"Create":return;case"Update":return U(e);case"Delete":return E(e.ResourceProperties?.BucketName)}}async function U(e){let t=e,o=t.OldResourceProperties?.BucketName,n=t.ResourceProperties?.BucketName;if(n!=null&&o!=null&&n!==o)return E(o)}async function N(e){try{let t=(await c.getBucketPolicy({Bucket:e}))?.Policy??F,o=JSON.parse(t);o.Statement.push({Principal:"*",Effect:"Deny",Action:["s3:PutObject"],Resource:[`arn:aws:s3:::${e}/*`]}),await c.putBucketPolicy({Bucket:e,Policy:JSON.stringify(o)})}catch(t){if(t.name==="NoSuchBucket")throw t;console.log(`Could not set new object deny policy on bucket '${e}' prior to deletion.`)}}async function f(e){let t=await c.listObjectVersions({Bucket:e}),o=[...t.Versions??[],...t.DeleteMarkers??[]];if(o.length===0)return;let n=o.map(s=>({Key:s.Key,VersionId:s.VersionId}));await c.deleteObjects({Bucket:e,Delete:{Objects:n}}),t?.IsTruncated&&await f(e)}async function E(e){if(!e)throw new Error("No BucketName was provided.");try{if(!await W(e)){console.log(`Bucket does not have '${g}' tag, skipping cleaning.`);return}await N(e),await f(e)}catch(t){if(t.name==="NoSuchBucket"){console.log(`Bucket '${e}' does not exist.`);return}throw t}}async function W(e){return(await c.getBucketTagging({Bucket:e})).TagSet?.some(o=>o.Key===g&&o.Value==="true")}0&&(module.exports={autoDeleteHandler,handler}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json index 55b546e762310..4b6b4ec05124a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.assets.json @@ -1,20 +1,20 @@ { "version": "36.0.0", "files": { - "2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3": { + "54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c": { "source": { - "path": "asset.2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3", + "path": "asset.54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c", "packaging": "zip" }, "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3.zip", + "objectKey": "54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c.zip", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "66886bd8f1a19453a9d88ba798e6cc8193518e117a17e1e3f31f2d95a4b2acf3": { + "4014d8c32c4c24d6e42c9648a97130e3370b1bb5508372ea3245f468ab0813f3": { "source": { "path": "aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "66886bd8f1a19453a9d88ba798e6cc8193518e117a17e1e3f31f2d95a4b2acf3.json", + "objectKey": "4014d8c32c4c24d6e42c9648a97130e3370b1bb5508372ea3245f468ab0813f3.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json index b6e7eb633d6f0..b7a01a2a8f06c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/aws-cdk-codepipeline-pipeline-type-v2-by-default.template.json @@ -116,7 +116,7 @@ "S3Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" }, - "S3Key": "2ec8ad9e91dcd6e7ad6a5c84ffc6c9c05c408aca3b26ceb2816d81043e6c4dc3.zip" + "S3Key": "54e6f07bf3aea46d100719f3b21fe0fb45ae789ee372d42d8cdfb97e21aba96c.zip" }, "Timeout": 900, "MemorySize": 128, diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json index 0affb6fd44038..c2caa492a528c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-type-v2-by-default.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/66886bd8f1a19453a9d88ba798e6cc8193518e117a17e1e3f31f2d95a4b2acf3.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4014d8c32c4c24d6e42c9648a97130e3370b1bb5508372ea3245f468ab0813f3.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ From aae186117d5d67306b28826f7f3d3b0e140bf63d Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:43:27 +0900 Subject: [PATCH 12/20] README --- packages/aws-cdk-lib/aws-codepipeline/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-codepipeline/README.md b/packages/aws-cdk-lib/aws-codepipeline/README.md index 5ceb4653551bd..f08a8306c7be0 100644 --- a/packages/aws-cdk-lib/aws-codepipeline/README.md +++ b/packages/aws-cdk-lib/aws-codepipeline/README.md @@ -651,7 +651,7 @@ To migrate your pipeline type from V1 to V2, you just need to update the `pipeli This migration does not cause replacement of your pipeline. When the `@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2` feature flag is set to `true` (default for new projects), -the V2 type is selected by default. Otherwise, the V1 type is selected. +the V2 type is selected by default if you do not specify a value for `pipelineType` property. Otherwise, the V1 type is selected. ```ts new codepipeline.Pipeline(this, 'Pipeline', { From 79cd494cbcd1c76874eb504e4c5cfda3f67fb87e Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Tue, 12 Mar 2024 23:49:44 +0900 Subject: [PATCH 13/20] test for app context --- .../test/cloudformation/integ.stacksets.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts index 85972dc67f432..18d2d521e25be 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts @@ -76,11 +76,7 @@ export class StackSetPipelineStack extends Stack { } } -const app = new App({ - postCliContext: { - '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, - }, -}); +const app = new App(); const stack = new StackSetPipelineStack(app, 'StackSetPipelineStack'); new IntegTest(app, 'StackSetPipelineStackInteg', { testCases: [stack], From ce29920a9d1692abd53b44182dc4ef82ca42678a Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Tue, 12 Mar 2024 23:53:34 +0900 Subject: [PATCH 14/20] test postCliContext vs context --- .../test/pipelines/test/integ.pipeline-with-variables.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts index fb2b395070275..4b0640e80192f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts @@ -51,7 +51,7 @@ class PipelineStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, From 31c5b13082d7509209782036575abb9cbf8e1c4f Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Mar 2024 00:21:07 +0900 Subject: [PATCH 15/20] Revert "test for app context" This reverts commit 79cd494cbcd1c76874eb504e4c5cfda3f67fb87e. --- .../test/cloudformation/integ.stacksets.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts index 18d2d521e25be..85972dc67f432 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts @@ -76,7 +76,11 @@ export class StackSetPipelineStack extends Stack { } } -const app = new App(); +const app = new App({ + postCliContext: { + '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, + }, +}); const stack = new StackSetPipelineStack(app, 'StackSetPipelineStack'); new IntegTest(app, 'StackSetPipelineStackInteg', { testCases: [stack], From 85f008e51e8e7cf971f858eb17ad4e3044a2eadd Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Mar 2024 00:54:59 +0900 Subject: [PATCH 16/20] change postCliContext to context --- .../pipelines/test/integ.newpipeline-with-codebuild-logging.ts | 2 +- .../integ.newpipeline-with-cross-region-replication-buckets.ts | 2 +- .../test/integ.newpipeline-with-file-system-locations.ts | 2 +- .../test/pipelines/test/integ.newpipeline-with-vpc.ts | 2 +- .../framework-integ/test/pipelines/test/integ.newpipeline.ts | 2 +- .../test/pipelines/test/integ.pipeline-security.ts | 2 +- .../test/pipelines/test/integ.pipeline-with-artifact-bucket.ts | 2 +- .../pipelines/test/integ.pipeline-with-assets-single-upload.ts | 2 +- .../test/pipelines/test/integ.pipeline-with-assets.ts | 2 +- .../test/integ.pipeline-with-stack-outputs-in-custom-step.ts | 2 +- .../test/pipelines/test/integ.pipeline-without-prepare.ts | 2 +- .../framework-integ/test/pipelines/test/integ.pipeline.ts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts index 637b794f5e43a..a12ba71e3ab63 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts @@ -68,7 +68,7 @@ class AppStage extends Stage { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts index 579d9a3a02f90..92708fdd3d2b6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts @@ -73,7 +73,7 @@ class AppStage extends Stage { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts index 99499134a6ff6..7651435a9ef1e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts @@ -58,7 +58,7 @@ class AppStage extends Stage { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts index 9d4baa745ee4b..d769c9395585d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts @@ -47,7 +47,7 @@ class AppStage extends Stage { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts index 2434b94f5e3d5..bd0e4cd521078 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts @@ -52,7 +52,7 @@ class AppStage extends Stage { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts index 82870e7515ffa..8dfd4c37e6141 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts @@ -98,7 +98,7 @@ export class TestCdkStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts index a06d3bb34b83e..2f30bfc0f35fd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts @@ -27,7 +27,7 @@ class PipelineStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts index c05a52e685eba..b32ccbce568e6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts @@ -90,7 +90,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts index 3c71922e1e02d..cb1cd1750532e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts @@ -89,7 +89,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts index bdaf4211e6e55..2008684dd046d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts @@ -78,7 +78,7 @@ class PipelineStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts index 58a19c2e3d901..d9f1d28f43477 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts @@ -65,7 +65,7 @@ class PipelineStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts index b8afeedfc285d..20092a1718a28 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts @@ -79,7 +79,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, From 8ad99f0825507f9d6d874eed9cbbd74c321e65c9 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Mar 2024 01:02:44 +0900 Subject: [PATCH 17/20] change postCliContext added newly to context --- .../test/aws-appconfig/test/integ.configuration.ts | 2 +- .../test/cloudformation/integ.stacksets.ts | 2 +- .../test/integ.cfn-template-from-repo.lit.ts | 2 +- .../test/integ.lambda-deployed-through-codepipeline.lit.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts | 2 +- .../test/integ.pipeline-alexa-deploy.ts | 2 +- .../test/integ.pipeline-cfn-cross-region.ts | 2 +- .../test/integ.pipeline-cfn-with-action-role.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts | 2 +- .../test/integ.pipeline-code-build-batch.ts | 2 +- .../test/integ.pipeline-code-build-multiple-inputs-outputs.ts | 2 +- .../test/integ.pipeline-code-commit-build.ts | 2 +- .../test/integ.pipeline-code-deploy-ecs.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts | 2 +- .../test/integ.pipeline-elastic-beanstalk-deploy.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.pipeline-events.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-jenkins.ts | 2 +- .../test/integ.pipeline-manual-approval.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts | 2 +- .../test/integ.pipeline-stepfunctions.ts | 2 +- .../test/integ.pipeline-with-replication.ts | 2 +- .../test/s3/integ.source-bucket-events-cross-stack-same-env.ts | 2 +- .../test/codepipeline/integ.pipeline-event-target.ts | 2 +- .../pipelines/test/integ.newpipeline-with-cross-account-keys.ts | 2 +- .../@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts | 2 +- .../test/integ.codepipeline-start-pipeline-execution.ts | 2 +- .../test/integ.cfn-template-from-repo.lit.ts | 2 +- .../test/integ.lambda-deployed-through-codepipeline.lit.ts | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts index eb77c8f596506..a3cc580fa1cfc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts @@ -33,7 +33,7 @@ def handler(event, context): `; const app = new App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts index 85972dc67f432..e5b6b8a8d4f98 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts @@ -77,7 +77,7 @@ export class StackSetPipelineStack extends Stack { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 6dc0545738ee4..0bb2d75c06c3e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index f74a7a480a7e6..1e765986ca087 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -8,7 +8,7 @@ import * as codepipeline_actions from 'aws-cdk-lib/aws-codepipeline-actions'; import { STANDARD_NODEJS_RUNTIME } from '../../config'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts index 269e150371f62..5f2e88f165150 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts @@ -7,7 +7,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; import { STANDARD_NODEJS_RUNTIME } from '../../config'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts index 513ee5e7a85e9..efcd98f54a7d4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts @@ -4,7 +4,7 @@ import { App, RemovalPolicy, SecretValue, Stack } from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts index b978eee5ba3b9..bb47cad51b5c9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts index c657b0d3c9205..716d762eec2a4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts index b670dc5dd39f8..773c9b43f08ab 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts index d1897f4561fd9..047aca1f4b781 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts @@ -6,7 +6,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts index cd2b2d3404a39..97ff81b919850 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts @@ -6,7 +6,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts index 2c9adf022da21..3c0fd5135e8e8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts @@ -7,7 +7,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; /* eslint-disable quote-props */ const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts index c9b7ef7f5331c..fdc8a8fbf3b05 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts index a151c41a08e86..d8eb0b8dc71e1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts index 2dbdbfc0c5e90..de816914f13ae 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts @@ -25,7 +25,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; */ const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts index 867a78ccb5e43..899b72a592d9f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts @@ -10,7 +10,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; /* eslint-disable quote-props */ const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts index ff19f0342c7b5..d66e920b3b2f6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts @@ -22,7 +22,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; */ const app = new App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts index badaf54589e7f..e83b54b4378f8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts @@ -10,7 +10,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts index 3b3de3226380b..063ab587eb55e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts index 766ecd6381230..09b15892cf354 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts index 1e4f2192519b6..0c4f5f536a521 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts @@ -7,7 +7,7 @@ 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({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts index 1c02051327ffc..cd0a9e639be95 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts index 2947d24b0eb6f..0ee09afb76c25 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts @@ -8,7 +8,7 @@ import { S3SourceAction, CodeBuildAction } from 'aws-cdk-lib/aws-codepipeline-ac const app = new App({ treeMetadata: false, - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts index ab6db0b2219f2..a0df90179c50b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts @@ -8,7 +8,7 @@ import * as integ from '@aws-cdk/integ-tests-alpha'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts index 198ee0fc9dafe..bef236b1923f3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts @@ -32,7 +32,7 @@ class MockAction implements codepipeline.IAction { } const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts index c2648fd90d748..33f63dad1675c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts @@ -54,7 +54,7 @@ class AppStage extends Stage { } const app = new App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts index a25287b7bf31a..54cb639c650ee 100644 --- a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts @@ -33,7 +33,7 @@ def handler(event, context): `; const app = new App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts index 35e160a7892ed..e5ed490a4d1c7 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts @@ -18,7 +18,7 @@ import { CodePipelineStartPipelineExecution } from '../lib/codepipeline-start-pi * 3. The pipeline is invoked by the scheduler every minute (but it needs only one successful execution to pass). */ const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 0811d85c5e127..885b99a18ef01 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -4,7 +4,7 @@ import * as cdk from '../../core'; import * as cpactions from '../lib'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index a00d835d17e25..4a1b19176a848 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -7,7 +7,7 @@ import * as cdk from '../../core'; import * as codepipeline_actions from '../lib'; const app = new cdk.App({ - postCliContext: { + context: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); From 26216003dde269dfc5d371c746819f09b3b958b8 Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Mar 2024 01:28:27 +0900 Subject: [PATCH 18/20] Revert "change postCliContext added newly to context" This reverts commit 8ad99f0825507f9d6d874eed9cbbd74c321e65c9. --- .../test/aws-appconfig/test/integ.configuration.ts | 2 +- .../test/cloudformation/integ.stacksets.ts | 2 +- .../test/integ.cfn-template-from-repo.lit.ts | 2 +- .../test/integ.lambda-deployed-through-codepipeline.lit.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts | 2 +- .../test/integ.pipeline-alexa-deploy.ts | 2 +- .../test/integ.pipeline-cfn-cross-region.ts | 2 +- .../test/integ.pipeline-cfn-with-action-role.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts | 2 +- .../test/integ.pipeline-code-build-batch.ts | 2 +- .../test/integ.pipeline-code-build-multiple-inputs-outputs.ts | 2 +- .../test/integ.pipeline-code-commit-build.ts | 2 +- .../test/integ.pipeline-code-deploy-ecs.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts | 2 +- .../test/integ.pipeline-elastic-beanstalk-deploy.ts | 2 +- .../test/aws-codepipeline-actions/test/integ.pipeline-events.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-jenkins.ts | 2 +- .../test/integ.pipeline-manual-approval.ts | 2 +- .../aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts | 2 +- .../test/integ.pipeline-stepfunctions.ts | 2 +- .../test/integ.pipeline-with-replication.ts | 2 +- .../test/s3/integ.source-bucket-events-cross-stack-same-env.ts | 2 +- .../test/codepipeline/integ.pipeline-event-target.ts | 2 +- .../pipelines/test/integ.newpipeline-with-cross-account-keys.ts | 2 +- .../@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts | 2 +- .../test/integ.codepipeline-start-pipeline-execution.ts | 2 +- .../test/integ.cfn-template-from-repo.lit.ts | 2 +- .../test/integ.lambda-deployed-through-codepipeline.lit.ts | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts index a3cc580fa1cfc..eb77c8f596506 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-appconfig/test/integ.configuration.ts @@ -33,7 +33,7 @@ def handler(event, context): `; const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts index e5b6b8a8d4f98..85972dc67f432 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/cloudformation/integ.stacksets.ts @@ -77,7 +77,7 @@ export class StackSetPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 0bb2d75c06c3e..6dc0545738ee4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 1e765986ca087..f74a7a480a7e6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -8,7 +8,7 @@ import * as codepipeline_actions from 'aws-cdk-lib/aws-codepipeline-actions'; import { STANDARD_NODEJS_RUNTIME } from '../../config'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts index 5f2e88f165150..269e150371f62 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.lambda-pipeline.ts @@ -7,7 +7,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; import { STANDARD_NODEJS_RUNTIME } from '../../config'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts index efcd98f54a7d4..513ee5e7a85e9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-alexa-deploy.ts @@ -4,7 +4,7 @@ import { App, RemovalPolicy, SecretValue, Stack } from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts index bb47cad51b5c9..b978eee5ba3b9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-cross-region.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts index 716d762eec2a4..c657b0d3c9205 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn-with-action-role.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts index 773c9b43f08ab..b670dc5dd39f8 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-cfn.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts index 047aca1f4b781..d1897f4561fd9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-batch.ts @@ -6,7 +6,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts index 97ff81b919850..cd2b2d3404a39 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-build-multiple-inputs-outputs.ts @@ -6,7 +6,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts index 3c0fd5135e8e8..2c9adf022da21 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-commit-build.ts @@ -7,7 +7,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; /* eslint-disable quote-props */ const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts index fdc8a8fbf3b05..c9b7ef7f5331c 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy-ecs.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts index d8eb0b8dc71e1..a151c41a08e86 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-code-deploy.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts index de816914f13ae..2dbdbfc0c5e90 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecr-source.ts @@ -25,7 +25,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; */ const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts index 899b72a592d9f..867a78ccb5e43 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-ecs-deploy.ts @@ -10,7 +10,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; /* eslint-disable quote-props */ const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts index d66e920b3b2f6..ff19f0342c7b5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-elastic-beanstalk-deploy.ts @@ -22,7 +22,7 @@ import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; */ const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts index e83b54b4378f8..badaf54589e7f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-events.ts @@ -10,7 +10,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts index 063ab587eb55e..3b3de3226380b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-jenkins.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts index 09b15892cf354..766ecd6381230 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-manual-approval.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts index 0c4f5f536a521..1e4f2192519b6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-s3-deploy.ts @@ -7,7 +7,7 @@ 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({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts index cd0a9e639be95..1c02051327ffc 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-stepfunctions.ts @@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts index 0ee09afb76c25..2947d24b0eb6f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/integ.pipeline-with-replication.ts @@ -8,7 +8,7 @@ import { S3SourceAction, CodeBuildAction } from 'aws-cdk-lib/aws-codepipeline-ac const app = new App({ treeMetadata: false, - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts index a0df90179c50b..ab6db0b2219f2 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-codepipeline-actions/test/s3/integ.source-bucket-events-cross-stack-same-env.ts @@ -8,7 +8,7 @@ import * as integ from '@aws-cdk/integ-tests-alpha'; import * as cpactions from 'aws-cdk-lib/aws-codepipeline-actions'; const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts index bef236b1923f3..198ee0fc9dafe 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-events-targets/test/codepipeline/integ.pipeline-event-target.ts @@ -32,7 +32,7 @@ class MockAction implements codepipeline.IAction { } const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts index 33f63dad1675c..c2648fd90d748 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-account-keys.ts @@ -54,7 +54,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts index 54cb639c650ee..a25287b7bf31a 100644 --- a/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts +++ b/packages/@aws-cdk/aws-appconfig-alpha/test/integ.configuration.ts @@ -33,7 +33,7 @@ def handler(event, context): `; const app = new App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts index e5ed490a4d1c7..35e160a7892ed 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.codepipeline-start-pipeline-execution.ts @@ -18,7 +18,7 @@ import { CodePipelineStartPipelineExecution } from '../lib/codepipeline-start-pi * 3. The pipeline is invoked by the scheduler every minute (but it needs only one successful execution to pass). */ const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts index 885b99a18ef01..0811d85c5e127 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.cfn-template-from-repo.lit.ts @@ -4,7 +4,7 @@ import * as cdk from '../../core'; import * as cpactions from '../lib'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); diff --git a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts index 4a1b19176a848..a00d835d17e25 100644 --- a/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts +++ b/packages/aws-cdk-lib/aws-codepipeline-actions/test/integ.lambda-deployed-through-codepipeline.lit.ts @@ -7,7 +7,7 @@ import * as cdk from '../../core'; import * as codepipeline_actions from '../lib'; const app = new cdk.App({ - context: { + postCliContext: { '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, }); From 6e0689d064ac3f114d096e1e5336503f3ea7b01e Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Mar 2024 01:28:29 +0900 Subject: [PATCH 19/20] Revert "change postCliContext to context" This reverts commit 85f008e51e8e7cf971f858eb17ad4e3044a2eadd. --- .../pipelines/test/integ.newpipeline-with-codebuild-logging.ts | 2 +- .../integ.newpipeline-with-cross-region-replication-buckets.ts | 2 +- .../test/integ.newpipeline-with-file-system-locations.ts | 2 +- .../test/pipelines/test/integ.newpipeline-with-vpc.ts | 2 +- .../framework-integ/test/pipelines/test/integ.newpipeline.ts | 2 +- .../test/pipelines/test/integ.pipeline-security.ts | 2 +- .../test/pipelines/test/integ.pipeline-with-artifact-bucket.ts | 2 +- .../pipelines/test/integ.pipeline-with-assets-single-upload.ts | 2 +- .../test/pipelines/test/integ.pipeline-with-assets.ts | 2 +- .../test/integ.pipeline-with-stack-outputs-in-custom-step.ts | 2 +- .../test/pipelines/test/integ.pipeline-without-prepare.ts | 2 +- .../framework-integ/test/pipelines/test/integ.pipeline.ts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts index a12ba71e3ab63..637b794f5e43a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-codebuild-logging.ts @@ -68,7 +68,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts index 92708fdd3d2b6..579d9a3a02f90 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-cross-region-replication-buckets.ts @@ -73,7 +73,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts index 7651435a9ef1e..99499134a6ff6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.ts @@ -58,7 +58,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts index d769c9395585d..9d4baa745ee4b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.ts @@ -47,7 +47,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts index bd0e4cd521078..2434b94f5e3d5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline.ts @@ -52,7 +52,7 @@ class AppStage extends Stage { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts index 8dfd4c37e6141..82870e7515ffa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-security.ts @@ -98,7 +98,7 @@ export class TestCdkStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts index 2f30bfc0f35fd..a06d3bb34b83e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-artifact-bucket.ts @@ -27,7 +27,7 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts index b32ccbce568e6..c05a52e685eba 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets-single-upload.ts @@ -90,7 +90,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts index cb1cd1750532e..3c71922e1e02d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-assets.ts @@ -89,7 +89,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts index 2008684dd046d..bdaf4211e6e55 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-stack-outputs-in-custom-step.ts @@ -78,7 +78,7 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts index d9f1d28f43477..58a19c2e3d901 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-without-prepare.ts @@ -65,7 +65,7 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts index 20092a1718a28..b8afeedfc285d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline.ts @@ -79,7 +79,7 @@ class CdkpipelinesDemoPipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': 'true', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, }, From 0abe694fcc7e8ef36cb99bac3922b7ffcf9b6e5b Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Wed, 13 Mar 2024 01:28:32 +0900 Subject: [PATCH 20/20] Revert "test postCliContext vs context" This reverts commit ce29920a9d1692abd53b44182dc4ef82ca42678a. --- .../test/pipelines/test/integ.pipeline-with-variables.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts index 4b0640e80192f..fb2b395070275 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.pipeline-with-variables.ts @@ -51,7 +51,7 @@ class PipelineStack extends Stack { } const app = new App({ - context: { + postCliContext: { '@aws-cdk/core:newStyleStackSynthesis': '1', '@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2': false, },