Skip to content

Commit

Permalink
chore(integ): consistently don't stage (#6769)
Browse files Browse the repository at this point in the history
* chore(integ): consistently don't stage

Staging was alternatively disabled and enabled for CDK apps during integ
tests, depending on the execution phase. Make the flags consistently
the same. This would have helped the debugging of the failure in #6720.

* Update tools/cdk-integ-tools/lib/integ-helpers.ts

Co-Authored-By: Jonathan Goldwasser <jogold@users.noreply.github.com>

Co-authored-by: Jonathan Goldwasser <jogold@users.noreply.github.com>
  • Loading branch information
rix0rrr and jogold authored Mar 18, 2020
1 parent 5dc1407 commit 315ac5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 0 additions & 5 deletions tools/cdk-integ-tools/bin/cdk-integ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ async function main() {

const args = new Array<string>();

// don't inject cloudformation metadata into template
args.push('--no-path-metadata');
args.push('--no-asset-metadata');
args.push('--no-staging');

// inject "--verbose" to the command line of "cdk" if we are in verbose mode
if (argv.verbose) {
args.push('--verbose');
Expand Down
12 changes: 11 additions & 1 deletion tools/cdk-integ-tools/lib/integ-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,19 @@ export class IntegrationTest {
this.deleteCdkContext();
}

const cliSwitches = [
// This would otherwise trip on every version update
'--no-version-reporting',
// don't inject cloudformation metadata into template
'--no-path-metadata',
'--no-asset-metadata',
// save a copy step by not staging assets
'--no-staging',
];

try {
const cdk = require.resolve('aws-cdk/bin/cdk');
return exec([cdk, '-a', `node ${this.name}`, '--no-version-reporting'].concat(args), {
return exec([cdk, '-a', `node ${this.name}`, ...cliSwitches, ...args], {
cwd: this.directory,
json: options.json,
verbose: options.verbose,
Expand Down

0 comments on commit 315ac5e

Please sign in to comment.