@dotcom-tool-kit/serverless 2.4.2 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tasks/deploy.d.ts.map +1 -1
- package/lib/tasks/deploy.js +10 -2
- package/lib/tasks/teardown.d.ts.map +1 -1
- package/lib/tasks/teardown.js +10 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/tasks/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAK/E,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IACzE,MAAM,CAAC,WAAW,SAAmB;IAE/B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/tasks/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAK/E,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IACzE,MAAM,CAAC,WAAW,SAAmB;IAE/B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyD3B"}
|
package/lib/tasks/deploy.js
CHANGED
|
@@ -8,7 +8,7 @@ const options_1 = require("@dotcom-tool-kit/options");
|
|
|
8
8
|
const child_process_1 = require("child_process");
|
|
9
9
|
class ServerlessDeploy extends types_1.Task {
|
|
10
10
|
async run() {
|
|
11
|
-
const { useVault, configPath, buildNumVariable, regions } = this.options;
|
|
11
|
+
const { useVault, configPath, buildNumVariable, regions, systemCode } = this.options;
|
|
12
12
|
const buildNum = process.env[buildNumVariable];
|
|
13
13
|
if (buildNum === undefined) {
|
|
14
14
|
throw new error_1.ToolKitError(`the ${logger_1.styles.task('ServerlessDeploy')} task requires the ${logger_1.styles.code(`$${buildNumVariable}`)} environment variable to be defined`);
|
|
@@ -33,7 +33,15 @@ class ServerlessDeploy extends types_1.Task {
|
|
|
33
33
|
}
|
|
34
34
|
for (const region of regions) {
|
|
35
35
|
this.logger.verbose('starting the child serverless process...');
|
|
36
|
-
const args = [
|
|
36
|
+
const args = [
|
|
37
|
+
'deploy',
|
|
38
|
+
'--region',
|
|
39
|
+
region,
|
|
40
|
+
'--stage',
|
|
41
|
+
'prod',
|
|
42
|
+
'--aws-profile',
|
|
43
|
+
`CircleCI-role-${systemCode}`
|
|
44
|
+
];
|
|
37
45
|
if (configPath) {
|
|
38
46
|
args.push('--config', configPath);
|
|
39
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teardown.d.ts","sourceRoot":"","sources":["../../src/tasks/teardown.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAM/E,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IAC3E,MAAM,CAAC,WAAW,SAA2C;IAEvD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"teardown.d.ts","sourceRoot":"","sources":["../../src/tasks/teardown.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAM/E,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IAC3E,MAAM,CAAC,WAAW,SAA2C;IAEvD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwD3B"}
|
package/lib/tasks/teardown.js
CHANGED
|
@@ -9,7 +9,7 @@ const child_process_1 = require("child_process");
|
|
|
9
9
|
const options_1 = require("@dotcom-tool-kit/options");
|
|
10
10
|
class ServerlessTeardown extends types_1.Task {
|
|
11
11
|
async run() {
|
|
12
|
-
const { useVault, configPath, regions } = this.options;
|
|
12
|
+
const { useVault, configPath, regions, systemCode } = this.options;
|
|
13
13
|
const reviewState = (0, state_1.readState)('review');
|
|
14
14
|
if (!reviewState || !reviewState.stageName) {
|
|
15
15
|
throw new error_1.ToolKitError(`Could not find state for review, check that ${logger_1.styles.hook('deploy:review')} ran successfully`);
|
|
@@ -33,7 +33,15 @@ class ServerlessTeardown extends types_1.Task {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
this.logger.verbose('starting the child serverless process...');
|
|
36
|
-
const args = [
|
|
36
|
+
const args = [
|
|
37
|
+
'remove',
|
|
38
|
+
'--region',
|
|
39
|
+
regions[0],
|
|
40
|
+
'--stage',
|
|
41
|
+
reviewState.stageName,
|
|
42
|
+
'--aws-profile',
|
|
43
|
+
`CircleCI-role-${systemCode}`
|
|
44
|
+
];
|
|
37
45
|
if (configPath) {
|
|
38
46
|
args.push('--config', './serverless.yml');
|
|
39
47
|
}
|