diff --git a/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts b/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts index a5cfd6b496e5c..0c8f5e11eac53 100644 --- a/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts +++ b/packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts @@ -34,6 +34,12 @@ async function main() { type: 'boolean', requiresArg: false, }) + .option('regression', { + description: 'Enable access to previous versions of the staged packages (this is expensive for CodeArtifact so we only do it when necessary)', + type: 'boolean', + requiresArg: false, + default: false, + }) .command('publish ', 'Publish a given directory', cmd => cmd .positional('DIRECTORY', { descripton: 'Directory distribution', @@ -190,6 +196,7 @@ async function publish(repo: TestRepository, usageDir: UsageDir, args: { python?: boolean; java?: boolean; dotnet?: boolean; + regression?: boolean; }) { const directory = `${args.DIRECTORY}`; const login = await repo.loginInformation(); @@ -221,8 +228,10 @@ async function publish(repo: TestRepository, usageDir: UsageDir, args: { await uploadDotnetPackages(glob.sync(path.join(directory, 'dotnet', '**', '*.nupkg')), usageDir); }); - console.log('🛍 Configuring packages for upstream versions'); - await repo.markAllUpstreamAllow(); + if (args.regression) { + console.log('🛍 Configuring packages for upstream versions'); + await repo.markAllUpstreamAllow(); + } } function whichRepos(args: { diff --git a/packages/aws-cdk/test/integ/test-cli-regression-against-current-code.sh b/packages/aws-cdk/test/integ/test-cli-regression-against-current-code.sh index c735580c9fd58..b8d3684c70ba6 100755 --- a/packages/aws-cdk/test/integ/test-cli-regression-against-current-code.sh +++ b/packages/aws-cdk/test/integ/test-cli-regression-against-current-code.sh @@ -9,4 +9,4 @@ previous=$(${INTEG_TOOLS}/bin/query-github last-release --token $GITHUB_TOKEN -- echo "Previous version is: $previous" # Old tests, new CLI, new framework -exec $INTEG_TOOLS/bin/download-and-run-old-tests "$previous" --use-cli-release=$VERSION cli-integ-tests +exec $INTEG_TOOLS/bin/download-and-run-old-tests "$previous" --regression --use-cli-release=$VERSION cli-integ-tests diff --git a/packages/aws-cdk/test/integ/test-cli-regression-against-latest-release.sh b/packages/aws-cdk/test/integ/test-cli-regression-against-latest-release.sh index 8c828fb2138ce..854eb047c06b9 100755 --- a/packages/aws-cdk/test/integ/test-cli-regression-against-latest-release.sh +++ b/packages/aws-cdk/test/integ/test-cli-regression-against-latest-release.sh @@ -8,4 +8,4 @@ previous=$(${INTEG_TOOLS}/bin/query-github last-release --token $GITHUB_TOKEN -- echo "Previous version is: $previous" # Old tests, new CLI, old framework -exec $INTEG_TOOLS/bin/download-and-run-old-tests "$previous" --use-cli-release=$VERSION --framework-version=$previous cli-integ-tests +exec $INTEG_TOOLS/bin/download-and-run-old-tests "$previous" --regression --use-cli-release=$VERSION --framework-version=$previous cli-integ-tests