@dotcom-tool-kit/serverless 2.4.3 → 2.4.5

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.
@@ -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;CAiD3B"}
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"}
@@ -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 = ['deploy', '--region', region, '--stage', 'prod'];
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcom-tool-kit/serverless",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "description": "a plugin to manage and deploy apps using AWS Serverless",
5
5
  "main": "lib",
6
6
  "scripts": {
@@ -25,11 +25,11 @@
25
25
  "serverless-offline": "^12.0.4"
26
26
  },
27
27
  "dependencies": {
28
- "@dotcom-tool-kit/doppler": "^1.1.0",
28
+ "@dotcom-tool-kit/doppler": "^1.1.1",
29
29
  "@dotcom-tool-kit/error": "^3.2.0",
30
- "@dotcom-tool-kit/options": "^3.2.0",
30
+ "@dotcom-tool-kit/options": "^3.2.1",
31
31
  "@dotcom-tool-kit/state": "^3.3.0",
32
- "@dotcom-tool-kit/types": "^3.6.0",
32
+ "@dotcom-tool-kit/types": "^3.6.1",
33
33
  "get-port": "^5.1.1",
34
34
  "tslib": "^2.3.1",
35
35
  "wait-port": "^0.2.9"
package/readme.md CHANGED
@@ -25,7 +25,7 @@ plugins:
25
25
  |-|-|-|
26
26
  | `awsAccountId` | [required] the ID of the AWS account you wish to deploy to (account IDs can be found at the [FT login page](https://awslogin.in.ft.com/)) | none |
27
27
  | `systemCode` | [required] the system code for your app | none |
28
- | `region` | [require] what AWS region you want to deploy to (usually `eu-west-1`) | none |
28
+ | `regions` | [optional] an array of AWS regions you want to deploy to | `['eu-west-1']` |
29
29
  | `configPath` | [optional] path to your serverless config file. If this is not provided aws defaults to `./serverless.yml` but [other config fomats are accepted](https://www.serverless.com/framework/docs/providers/aws/guide/intro#alternative-configuration-format)| |
30
30
  | `useVault` | option to run the application with environment variables from Vault | `true` |
31
31
  | `ports` | ports to try to bind to for this application | `[3001, 3002, 3003]` |