Skip to content

Commit

Permalink
fix(serverless): executor fix to support private gateway, proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
wyvern8 committed Jul 5, 2018
1 parent 8b83246 commit 8111ad6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .envExample
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ GTM_AWS_KMS_KEY_ID=<redacted>
GTM_SLS_EXECUTOR_AWS_STAGE=<stage for lambdas deployed by ExecutorDockerServerless>
GTM_SLS_EXECUTOR_AWS_REGION=<region for lambdas>
GTM_SLS_EXECUTOR_AWS_EXECUTION_ROLE=<iam role for lambda execution>
GTM_SLS_EXECUTOR_DEPLOY_MODE=parallel
GTM_SLS_EXECUTOR_APIGW_ENDPOINT_TYPE=EDGE
GTM_SLS_EXECUTOR_APIGW_DOMAIN_SUFFIX=lambda.mysuffix.com
GTM_SLS_EXECUTOR_HTTP_PROXY=
GTM_SLS_EXECUTOR_NO_PROXY=

GTM_CRYPT_GITHUB_TOKEN=<redacted>
GTM_CRYPT_GITHUB_WEBHOOK_SECRET=<redacted>
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ Create an asynchronous CI agnostic mechanism for running custom test stage gates
|GTM_SLS_EXECUTOR_AWS_REGION| aws region for lambdas default ap-southeast-2|
|GTM_SLS_EXECUTOR_AWS_EXECUTION_ROLE| docker serverless lambda execution role |
|GTM_SLS_EXECUTOR_DEPLOY_MODE| deploy multiple lambdas 'parallel' (default) or 'sequential'|
|GTM_SLS_EXECUTOR_APIGW_ENDPOINT_TYPE|EDGE or REGIONAL or PRIVATE|
|GTM_SLS_EXECUTOR_APIGW_DOMAIN_SUFFIX|reverse proxy domain name that will have apiId added as subdomain. eg. lambda.mysuffix.com will result in [apiId].lambda.mysuffix.com|
|GTM_SLS_EXECUTOR_HTTP_PROXY|proxy passed to serverless executor|
|GTM_SLS_EXECUTOR_NO_PROXY|no_proxy passed to serverless executor|

> important: values of env vars prefixed with `GTM_CRYPT_*` must be created via `npm run sls-encrypt [name] [value]`
Expand Down
6 changes: 5 additions & 1 deletion src/executors/ExecutorDockerServerless.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ export class ExecutorDockerServerless extends ExecutorDocker {
SLS_AWS_STAGE: this.slsStage(),
SLS_AWS_REGION: process.env.GTM_SLS_EXECUTOR_AWS_REGION || 'ap-southeast-2',
SLS_AWS_EXECUTION_ROLE: process.env.GTM_SLS_EXECUTOR_AWS_EXECUTION_ROLE,
SLS_DEPLOY_MODE: process.env.GTM_SLS_EXECUTOR_DEPLOY_MODE || 'parallel'
SLS_DEPLOY_MODE: process.env.GTM_SLS_EXECUTOR_DEPLOY_MODE || 'parallel',
SLS_APIGW_ENDPOINT_TYPE: process.env.GTM_SLS_EXECUTOR_APIGW_ENDPOINT_TYPE,
SLS_APIGW_DOMAIN_SUFFIX: process.env.GTM_SLS_EXECUTOR_APIGW_DOMAIN_SUFFIX,
HTTP_PROXY: process.env.GTM_SLS_EXECUTOR_HTTP_PROXY,
NO_PROXY: process.env.GTM_SLS_EXECUTOR_NO_PROXY
},
validator: {
type: 'outputRegex',
Expand Down

0 comments on commit 8111ad6

Please sign in to comment.