-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
29 lines (25 loc) · 927 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
language: node_js
services: docker
sudo: required
node_js: v10
before_install:
- sudo /etc/init.d/postgresql stop
- sudo python -m pip install awscli
- npm install -g typescript
- npm install -g aws-cdk
- npm install
stages:
- name: Deploy Test
# Following Envs need to be set:
# AWS_ACCESS_KEY_ID, AWS_ACCOUNT_NUMBER, AWS_DEFAULT_REGION, AWS_SECRET_ACCESS_KEY, CDK_DEFAULT_ACCOUNT, CDK_DEFAULT_REGION
jobs:
include:
- stage: Deploy Test
name: Deploy to AWS Cloud
script:
- npm run build
- cdk deploy --require-approval never
- BASE_URL=$(aws cloudformation describe-stacks --stack-name ApiLambdaCrudDynamoDBExample --query "Stacks[0].Outputs[0].OutputValue" --output text)
- newman run test/alf-cdk.postman_collection.json --env-var baseUrl="$BASE_URL" -r cli,json --reporter-json-export dist/newman/report.json
after_failure:
- cat dist/newman/report.json