forked from thoughtworks/build-your-own-radar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
25 lines (25 loc) · 871 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
language: node_js
node_js:
- '10'
jobs:
include:
- stage: Unit Test
script: npm test
- stage: Deploy QA
script: npm run build
deploy:
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: myradar-qa
acl: public_read
skip_cleanup: true
local_dir: dist
on:
repo: thoughtworks/build-your-own-radar
condition: "$TRAVIS_PULL_REQUEST = false"
- stage: Invalidate CDN
install: pip install --user awscli && export PATH=$PATH:$HOME/.local/bin
script: 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then aws configure set preview.cloudfront true && aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"; fi'
- stage: End to end test
script: npm run end_to_end_test