From cce98fa8ecbc0d01d14a2faf78a371314623f6bc Mon Sep 17 00:00:00 2001 From: Kendra Neil <53584728+TheRealAmazonKendra@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:18:56 -0700 Subject: [PATCH 1/5] fix: pipelines ties cli version with cdk-assets version --- .../lib/codepipeline/codepipeline.ts | 7 +--- .../pipelines/lib/private/cli-version.ts | 41 ------------------- .../pipelines/test/compliance/assets.test.ts | 4 +- .../test/compliance/self-mutation.test.ts | 4 +- 4 files changed, 6 insertions(+), 50 deletions(-) delete mode 100644 packages/aws-cdk-lib/pipelines/lib/private/cli-version.ts diff --git a/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts b/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts index cef5a40dc459f..7d2a09e0829f0 100644 --- a/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts +++ b/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts @@ -21,7 +21,6 @@ import { GraphNodeCollection, isGraph, AGraphNode, PipelineGraph } from '../help import { PipelineBase } from '../main'; import { AssetSingletonRole } from '../private/asset-singleton-role'; import { CachedFnSub } from '../private/cached-fnsub'; -import { preferredCliVersion } from '../private/cli-version'; import { appOf, assemblyBuilderOf, embeddedAsmPath, obtainScope } from '../private/construct-internals'; import { CDKP_DEFAULT_CODEBUILD_IMAGE } from '../private/default-codebuild-image'; import { toPosixPath } from '../private/fs'; @@ -388,7 +387,7 @@ export class CodePipeline extends PipelineBase { this.selfMutationEnabled = props.selfMutation ?? true; this.dockerCredentials = props.dockerCredentials ?? []; this.singlePublisherPerAssetType = !(props.publishAssetsInParallel ?? true); - this.cliVersion = props.cliVersion ?? preferredCliVersion(); + this.cliVersion = props.cliVersion ?? 'latest'; this.useChangeSets = props.useChangeSets ?? true; this.stackOutputs = new StackOutputsMap(this); } @@ -817,8 +816,6 @@ export class CodePipeline extends PipelineBase { } private publishAssetsAction(node: AGraphNode, assets: StackAsset[]): ICodePipelineActionFactory { - const installSuffix = this.cliVersion ? `@${this.cliVersion}` : ''; - const commands = assets.map(asset => { const relativeAssetManifestPath = path.relative(this.myCxAsmRoot, asset.assetManifestPath); return `cdk-assets --path "${toPosixPath(relativeAssetManifestPath)}" --verbose publish "${asset.assetSelector}"`; @@ -840,7 +837,7 @@ export class CodePipeline extends PipelineBase { const script = new CodeBuildStep(node.id, { commands, installCommands: [ - `npm install -g cdk-assets${installSuffix}`, + 'npm install -g cdk-assets@latest', ], input: this._cloudAssemblyFileSet, buildEnvironment: { diff --git a/packages/aws-cdk-lib/pipelines/lib/private/cli-version.ts b/packages/aws-cdk-lib/pipelines/lib/private/cli-version.ts deleted file mode 100644 index 07ef8fa384fb3..0000000000000 --- a/packages/aws-cdk-lib/pipelines/lib/private/cli-version.ts +++ /dev/null @@ -1,41 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; - -/** - * Return the preferred CLI version for the current CDK Library version - * - * This is necessary to prevent cxapi version incompatibility between the two - * CDK major versions. Since changes currently go into v1 before they go into - * v2, a cxapi change can be released in v1 while the v2 CLI doesn't support it - * yet. - * - * In those cases, simply installing the "latest" CLI (2) is not good enough - * because it won't be able to read the Cloud Assembly of the v1 app. - * - * Find this version by finding the containing `package.json` and reading - * `preferredCdkCliVersion` from it. - */ -export function preferredCliVersion(): string | undefined { - const pjLocation = findUp('package.json', __dirname); - if (!pjLocation) { - return undefined; - } - const pj = JSON.parse(fs.readFileSync(pjLocation, { encoding: 'utf-8' })); - return pj.preferredCdkCliVersion ? `${pj.preferredCdkCliVersion}` : undefined; -} - -export function findUp(name: string, directory: string): string | undefined { - const absoluteDirectory = path.resolve(directory); - - const file = path.join(directory, name); - if (fs.existsSync(file)) { - return file; - } - - const { root } = path.parse(absoluteDirectory); - if (absoluteDirectory == root) { - return undefined; - } - - return findUp(name, path.dirname(absoluteDirectory)); -} \ No newline at end of file diff --git a/packages/aws-cdk-lib/pipelines/test/compliance/assets.test.ts b/packages/aws-cdk-lib/pipelines/test/compliance/assets.test.ts index 87c1ace7e9515..26e275300f272 100644 --- a/packages/aws-cdk-lib/pipelines/test/compliance/assets.test.ts +++ b/packages/aws-cdk-lib/pipelines/test/compliance/assets.test.ts @@ -253,7 +253,7 @@ describe('basic pipeline', () => { BuildSpec: Match.serializedJson(Match.objectLike({ phases: { install: { - commands: ['npm install -g cdk-assets@1.2.3'], + commands: ['npm install -g aws-cdk@1.2.3'], }, }, })), @@ -388,7 +388,7 @@ test('can supply pre-install scripts to asset upload', () => { BuildSpec: Match.serializedJson(Match.objectLike({ phases: { install: { - commands: ['npm config set registry https://registry.com', 'npm install -g cdk-assets@2'], + commands: ['npm config set registry https://registry.com', 'npm install -g cdk-assets@latest'], }, }, })), diff --git a/packages/aws-cdk-lib/pipelines/test/compliance/self-mutation.test.ts b/packages/aws-cdk-lib/pipelines/test/compliance/self-mutation.test.ts index 6b62207ba9bc7..4d86b0ef4bf1f 100644 --- a/packages/aws-cdk-lib/pipelines/test/compliance/self-mutation.test.ts +++ b/packages/aws-cdk-lib/pipelines/test/compliance/self-mutation.test.ts @@ -45,7 +45,7 @@ test('CodePipeline has self-mutation stage', () => { BuildSpec: Match.serializedJson(Match.objectLike({ phases: { install: { - commands: ['npm install -g aws-cdk@2'], + commands: ['npm install -g aws-cdk@latest'], }, build: { commands: Match.arrayWith(['cdk -a . deploy PipelineStack --require-approval=never --verbose']), @@ -187,7 +187,7 @@ test('self-mutation stage can be customized with BuildSpec', () => { BuildSpec: Match.serializedJson(Match.objectLike({ phases: { install: { - commands: ['npm config set registry example.com', 'npm install -g aws-cdk@2'], + commands: ['npm config set registry example.com', 'npm install -g aws-cdk@latest'], }, build: { commands: Match.arrayWith(['cdk -a . deploy PipelineStack --require-approval=never --verbose']), From 5a552ca4d588119857ca1408c851109314ff67ee Mon Sep 17 00:00:00 2001 From: Calvin Combs Date: Wed, 11 Sep 2024 10:25:14 -0700 Subject: [PATCH 2/5] restore CLI version logic --- .../lib/codepipeline/codepipeline.ts | 3 +- .../pipelines/lib/private/cli-version.ts | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 packages/aws-cdk-lib/pipelines/lib/private/cli-version.ts diff --git a/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts b/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts index 7d2a09e0829f0..3dbcd9bb09011 100644 --- a/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts +++ b/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts @@ -27,6 +27,7 @@ import { toPosixPath } from '../private/fs'; import { actionName, stackVariableNamespace } from '../private/identifiers'; import { enumerate, flatten, maybeSuffix, noUndefined } from '../private/javascript'; import { writeTemplateConfiguration } from '../private/template-configuration'; +import { preferredCliVersion } from '../private/cli-version'; /** * Properties for a `CodePipeline` @@ -387,7 +388,7 @@ export class CodePipeline extends PipelineBase { this.selfMutationEnabled = props.selfMutation ?? true; this.dockerCredentials = props.dockerCredentials ?? []; this.singlePublisherPerAssetType = !(props.publishAssetsInParallel ?? true); - this.cliVersion = props.cliVersion ?? 'latest'; + this.cliVersion = props.cliVersion ?? preferredCliVersion(); this.useChangeSets = props.useChangeSets ?? true; this.stackOutputs = new StackOutputsMap(this); } diff --git a/packages/aws-cdk-lib/pipelines/lib/private/cli-version.ts b/packages/aws-cdk-lib/pipelines/lib/private/cli-version.ts new file mode 100644 index 0000000000000..50624cab896b9 --- /dev/null +++ b/packages/aws-cdk-lib/pipelines/lib/private/cli-version.ts @@ -0,0 +1,41 @@ +import * as fs from 'fs'; +import * as path from 'path'; + +/** + * Return the preferred CLI version for the current CDK Library version + * + * This is necessary to prevent cxapi version incompatibility between the two + * CDK major versions. Since changes currently go into v1 before they go into + * v2, a cxapi change can be released in v1 while the v2 CLI doesn't support it + * yet. + * + * In those cases, simply installing the "latest" CLI (2) is not good enough + * because it won't be able to read the Cloud Assembly of the v1 app. + * + * Find this version by finding the containing `package.json` and reading + * `preferredCdkCliVersion` from it. + */ +export function preferredCliVersion(): string | undefined { + const pjLocation = findUp('package.json', __dirname); + if (!pjLocation) { + return undefined; + } + const pj = JSON.parse(fs.readFileSync(pjLocation, { encoding: 'utf-8' })); + return pj.preferredCdkCliVersion ? `${pj.preferredCdkCliVersion}` : undefined; +} + +export function findUp(name: string, directory: string): string | undefined { + const absoluteDirectory = path.resolve(directory); + + const file = path.join(directory, name); + if (fs.existsSync(file)) { + return file; + } + + const { root } = path.parse(absoluteDirectory); + if (absoluteDirectory == root) { + return undefined; + } + + return findUp(name, path.dirname(absoluteDirectory)); +} From 2f13cdb5aea09464cb613f17c766760c7fcf1a5d Mon Sep 17 00:00:00 2001 From: Calvin Combs Date: Wed, 11 Sep 2024 10:25:48 -0700 Subject: [PATCH 3/5] import/order --- packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts b/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts index 3dbcd9bb09011..5b84403019ed5 100644 --- a/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts +++ b/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts @@ -21,13 +21,13 @@ import { GraphNodeCollection, isGraph, AGraphNode, PipelineGraph } from '../help import { PipelineBase } from '../main'; import { AssetSingletonRole } from '../private/asset-singleton-role'; import { CachedFnSub } from '../private/cached-fnsub'; +import { preferredCliVersion } from '../private/cli-version'; import { appOf, assemblyBuilderOf, embeddedAsmPath, obtainScope } from '../private/construct-internals'; import { CDKP_DEFAULT_CODEBUILD_IMAGE } from '../private/default-codebuild-image'; import { toPosixPath } from '../private/fs'; import { actionName, stackVariableNamespace } from '../private/identifiers'; import { enumerate, flatten, maybeSuffix, noUndefined } from '../private/javascript'; import { writeTemplateConfiguration } from '../private/template-configuration'; -import { preferredCliVersion } from '../private/cli-version'; /** * Properties for a `CodePipeline` From cb2f5ad0ba9bcd6316835b4e40599a7e730de851 Mon Sep 17 00:00:00 2001 From: Calvin Combs Date: Wed, 11 Sep 2024 11:39:56 -0700 Subject: [PATCH 4/5] tests --- .../pipelines/test/compliance/self-mutation.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/pipelines/test/compliance/self-mutation.test.ts b/packages/aws-cdk-lib/pipelines/test/compliance/self-mutation.test.ts index 4d86b0ef4bf1f..6b62207ba9bc7 100644 --- a/packages/aws-cdk-lib/pipelines/test/compliance/self-mutation.test.ts +++ b/packages/aws-cdk-lib/pipelines/test/compliance/self-mutation.test.ts @@ -45,7 +45,7 @@ test('CodePipeline has self-mutation stage', () => { BuildSpec: Match.serializedJson(Match.objectLike({ phases: { install: { - commands: ['npm install -g aws-cdk@latest'], + commands: ['npm install -g aws-cdk@2'], }, build: { commands: Match.arrayWith(['cdk -a . deploy PipelineStack --require-approval=never --verbose']), @@ -187,7 +187,7 @@ test('self-mutation stage can be customized with BuildSpec', () => { BuildSpec: Match.serializedJson(Match.objectLike({ phases: { install: { - commands: ['npm config set registry example.com', 'npm install -g aws-cdk@latest'], + commands: ['npm config set registry example.com', 'npm install -g aws-cdk@2'], }, build: { commands: Match.arrayWith(['cdk -a . deploy PipelineStack --require-approval=never --verbose']), From c26dbadefcbc634323635af09b15e80abfdd50fd Mon Sep 17 00:00:00 2001 From: Calvin Combs Date: Thu, 12 Sep 2024 09:37:17 -0700 Subject: [PATCH 5/5] integ --- .../PipelinesFileSystemLocations.assets.json | 6 +++--- .../PipelinesFileSystemLocations.template.json | 2 +- ...esFileSystemLocationsBetaStack18199ECAE.assets.json | 2 +- .../assembly-PipelinesFileSystemLocations-Beta/cdk.out | 2 +- .../manifest.json | 2 +- .../cdk.out | 2 +- ...ocationsDefaultTestDeployAssert3E26E748.assets.json | 2 +- .../integ.json | 2 +- .../manifest.json | 10 ++++++++-- .../tree.json | 2 +- .../PipelineStack.assets.json | 6 +++--- .../PipelineStack.template.json | 4 ++-- .../PipelineStackBetaStack1E6541489.assets.json | 2 +- .../assembly-PipelineStack-Beta/cdk.out | 2 +- .../assembly-PipelineStack-Beta/manifest.json | 2 +- .../integ.newpipeline-with-vpc.js.snapshot/cdk.out | 2 +- .../integ.newpipeline-with-vpc.js.snapshot/integ.json | 2 +- .../manifest.json | 4 ++-- .../integ.newpipeline-with-vpc.js.snapshot/tree.json | 4 ++-- 19 files changed, 33 insertions(+), 27 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/PipelinesFileSystemLocations.assets.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/PipelinesFileSystemLocations.assets.json index 5c093967f4871..6c5f44dc585b5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/PipelinesFileSystemLocations.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/PipelinesFileSystemLocations.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "files": { "44e9c4d7a5d3fd2d677e1a7e416b2b56f6b0104bd5eff9cac5557b4c65a9dc61": { "source": { @@ -14,7 +14,7 @@ } } }, - "5e0004324a8354d30a34b3bd504a2dba1b0e373208e8903287f60cabc0be21e5": { + "1834a7989c4a1aeed75f03828630c4aa2eafad73961dc3387147a35d0b090320": { "source": { "path": "PipelinesFileSystemLocations.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "5e0004324a8354d30a34b3bd504a2dba1b0e373208e8903287f60cabc0be21e5.json", + "objectKey": "1834a7989c4a1aeed75f03828630c4aa2eafad73961dc3387147a35d0b090320.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/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/PipelinesFileSystemLocations.template.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/PipelinesFileSystemLocations.template.json index d31c72cac96c7..d49a0a1258cb1 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/PipelinesFileSystemLocations.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/PipelinesFileSystemLocations.template.json @@ -1778,7 +1778,7 @@ ] }, "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@2\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelinesFileSystemLocations-Beta/PipelinesFileSystemLocationsBetaStack18199ECAE.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}", + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@latest\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelinesFileSystemLocations-Beta/PipelinesFileSystemLocationsBetaStack18199ECAE.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}", "Type": "CODEPIPELINE" }, "VpcConfig": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/PipelinesFileSystemLocationsBetaStack18199ECAE.assets.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/PipelinesFileSystemLocationsBetaStack18199ECAE.assets.json index 6addc0ddc487a..ad8f3838eeaea 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/PipelinesFileSystemLocationsBetaStack18199ECAE.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/PipelinesFileSystemLocationsBetaStack18199ECAE.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "files": { "8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/cdk.out index 1f0068d32659a..4efaa16f29af9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"36.0.24"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/manifest.json index 99e84da296345..e7ae43ab73f15 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/assembly-PipelinesFileSystemLocations-Beta/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "artifacts": { "PipelinesFileSystemLocationsBetaStack18199ECAE.assets": { "type": "cdk:asset-manifest", diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/cdk.out index 1f0068d32659a..4efaa16f29af9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"36.0.24"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/cdkintegcodepipelinewithfilesystemlocationsDefaultTestDeployAssert3E26E748.assets.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/cdkintegcodepipelinewithfilesystemlocationsDefaultTestDeployAssert3E26E748.assets.json index 1b5178da4e150..31d24fefd01d6 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/cdkintegcodepipelinewithfilesystemlocationsDefaultTestDeployAssert3E26E748.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/cdkintegcodepipelinewithfilesystemlocationsDefaultTestDeployAssert3E26E748.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/integ.json index 2315c96a256e6..2ce2fa0760d38 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "testCases": { "cdk-integ-codepipeline-with-file-system-locations/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/manifest.json index 5978987f8d9ac..e63808b34cbad 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "artifacts": { "assembly-PipelinesFileSystemLocations-Beta": { "type": "cdk:cloud-assembly", @@ -25,7 +25,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}/5e0004324a8354d30a34b3bd504a2dba1b0e373208e8903287f60cabc0be21e5.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1834a7989c4a1aeed75f03828630c4aa2eafad73961dc3387147a35d0b090320.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -203,6 +203,12 @@ "data": "LatestNodeRuntimeMap" } ], + "/PipelinesFileSystemLocations/Custom::S3AutoDeleteObjectsCustomResourceProvider": [ + { + "type": "aws:cdk:is-custom-resource-handler-customResourceProvider", + "data": true + } + ], "/PipelinesFileSystemLocations/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/tree.json index 6aeb12f9ba191..dfd3d25cb3291 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-file-system-locations.js.snapshot/tree.json @@ -2518,7 +2518,7 @@ }, "source": { "type": "CODEPIPELINE", - "buildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@2\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelinesFileSystemLocations-Beta/PipelinesFileSystemLocationsBetaStack18199ECAE.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}" + "buildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@latest\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelinesFileSystemLocations-Beta/PipelinesFileSystemLocationsBetaStack18199ECAE.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}" }, "vpcConfig": { "vpcId": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/PipelineStack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/PipelineStack.assets.json index f2bb5e0a90953..6fef6e96d2abf 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/PipelineStack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/PipelineStack.assets.json @@ -1,7 +1,7 @@ { - "version": "36.0.0", + "version": "36.0.24", "files": { - "d3c329bd55d36ed5a56bdbc0a65fdeb14e452376c9f0ff131a2180c88fc68fe5": { + "50afb09dbbed63ffee083f1d3cc6c19e231e3e57e2a16a2d8ce0ab51c89c3b16": { "source": { "path": "PipelineStack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "d3c329bd55d36ed5a56bdbc0a65fdeb14e452376c9f0ff131a2180c88fc68fe5.json", + "objectKey": "50afb09dbbed63ffee083f1d3cc6c19e231e3e57e2a16a2d8ce0ab51c89c3b16.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/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/PipelineStack.template.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/PipelineStack.template.json index 9f3e70354b7d8..7eaeb3bee3c85 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/PipelineStack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/PipelineStack.template.json @@ -1973,7 +1973,7 @@ ] }, "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@2\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}", + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@latest\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}", "Type": "CODEPIPELINE" }, "VpcConfig": { @@ -2072,7 +2072,7 @@ ] }, "Source": { - "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@2\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"ac76997971c3f6ddf37120660003f1ced72b4fc58c498dfd99c78fa77e721e0e:current_account-current_region\\\"\"\n ]\n }\n }\n}", + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@latest\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"ac76997971c3f6ddf37120660003f1ced72b4fc58c498dfd99c78fa77e721e0e:current_account-current_region\\\"\"\n ]\n }\n }\n}", "Type": "CODEPIPELINE" }, "VpcConfig": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json index 1c53d63e86cb7..ab4839bd939da 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "files": { "8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/cdk.out index 1f0068d32659a..4efaa16f29af9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"36.0.24"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/manifest.json index e5131f69213e7..3faa3f79b4938 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/assembly-PipelineStack-Beta/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "artifacts": { "PipelineStackBetaStack1E6541489.assets": { "type": "cdk:asset-manifest", diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/cdk.out index 1f0068d32659a..4efaa16f29af9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"36.0.0"} \ No newline at end of file +{"version":"36.0.24"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/integ.json index a8665877c2ad6..4fdd1e0b94b0a 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "testCases": { "integ.newpipeline-with-vpc": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/manifest.json index 9cb5bd3f3bf21..f19feec45d55d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "36.0.0", + "version": "36.0.24", "artifacts": { "assembly-PipelineStack-Beta": { "type": "cdk:cloud-assembly", @@ -25,7 +25,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}/d3c329bd55d36ed5a56bdbc0a65fdeb14e452376c9f0ff131a2180c88fc68fe5.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/50afb09dbbed63ffee083f1d3cc6c19e231e3e57e2a16a2d8ce0ab51c89c3b16.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/tree.json index a16f51e8d0592..eebcead68e1dd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/pipelines/test/integ.newpipeline-with-vpc.js.snapshot/tree.json @@ -2807,7 +2807,7 @@ }, "source": { "type": "CODEPIPELINE", - "buildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@2\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}" + "buildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@latest\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"8289faf53c7da377bb2b90615999171adef5e1d8f6b88810e5fef75e6ca09ba5:current_account-current_region\\\"\"\n ]\n }\n }\n}" }, "vpcConfig": { "vpcId": { @@ -2957,7 +2957,7 @@ }, "source": { "type": "CODEPIPELINE", - "buildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@2\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"ac76997971c3f6ddf37120660003f1ced72b4fc58c498dfd99c78fa77e721e0e:current_account-current_region\\\"\"\n ]\n }\n }\n}" + "buildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"install\": {\n \"commands\": [\n \"npm install -g cdk-assets@latest\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"cdk-assets --path \\\"assembly-PipelineStack-Beta/PipelineStackBetaStack1E6541489.assets.json\\\" --verbose publish \\\"ac76997971c3f6ddf37120660003f1ced72b4fc58c498dfd99c78fa77e721e0e:current_account-current_region\\\"\"\n ]\n }\n }\n}" }, "vpcConfig": { "vpcId": {