-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
37 lines (37 loc) · 2.02 KB
/
.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
30
31
32
33
34
35
36
37
language: node_js
node_js:
- 6.9.2
cache:
directories:
- node_modules
install:
- sudo apt-get update
- sudo apt-get install python
- python --version
- sudo apt-get -y install python-dev
- sudo apt-get -y install python-pip
- pip install --user awscli
- pip --help
- mkdir dist
- aws --version
script:
- npm install
- npm run prod
- if [ "$TRAVIS_BRANCH" = "master" ]; then aws --region sa-east-1 s3 sync . s3://eventosdobem-frontend
--acl public-read --exclude "package.json" --exclude ".travis.yml" --exclude "bitbucket-pipelines.yml"
--exclude "docker-local.sh" --exclude ".git/*" --exclude ".config/*" --exclude ".npm/*"
--exclude "node_modules/*"; fi
- if [ "$TRAVIS_BRANCH" = "production" ]; then aws --region sa-east-1 s3 sync . s3://eventosdobem-frontend-production
--acl public-read --exclude "package.json" --exclude ".travis.yml" --exclude "bitbucket-pipelines.yml"
--exclude "docker-local.sh" --exclude ".git/*" --exclude ".config/*" --exclude ".npm/*"
--exclude "node_modules/*"; fi
- aws configure set preview.cloudfront true
- if [ "$TRAVIS_BRANCH" = "master" ]; then aws cloudfront create-invalidation --distribution-id
E2GGIDEF1PPNTQ --paths "/*"; fi
- if [ "$TRAVIS_BRANCH" = "production" ]; then aws cloudfront create-invalidation
--distribution-id E1CX7CDU68AMAR --paths "/*"; fi
notifications:
email:
on_failure: always
slack:
secure: bAALgC3IX11a3LxKS+stkI0Jtl7GHsTk4GjP/eQ08ghJ+AbXtKnjxVlZ4OiDRgxeqWsXuQvHUxBEctiNrXdNX3s0NFqzri1kOLdpUn9yw4QrbXPDav9H7oL2WEgaS8uEcsaiY4Xhqzj9paMqhMwxQPl3lddhvu+6CsiQzUFjgDt+xqvqn1higYnjBsy6tqlFb90eTALmDNVMrW+PJMNdp5Or4egGuEdnU235RM9Uu3Jikjd0l4h0sbNSDGAhcRHuEyVbzyni77HI1+oj2+de/VCD/6kAhNNwUWxbHTJcx+AgEdYxR2Mc3Xkl1Zmf3Q5BxHjo4kgahvfO+elimadmnHI14LSSKoP0dFkMuGrPzt9HRucVyF78j1iw47ccdOcthC9UWCAP6p9UyX3YFxYdlmQioDxwZdpM0rcD8VgudFkkDHq4iy6u1AriDO/bALQ0RR9RX4CfF0yi7VkBLnOpJLs8QkSUGUCq1bEsRhbVbhyZMrQ+FJmoaKn7m2OoKVoBUJ9dU1HwUMlD1Tu1xz+ISpn45MddAdsk4rKxczYug3b/Uyh/r6lAVDgKyHZ576p1QwDy/5WD5r5mZcP9U9hpdkoYM5R7hBRWRCTvVOuGNCcrGmW1HNTcHmBOJLZElGLNOqafB5BLNB7p1APGS1o3dFZd5vihOzcmpvpl/sR+HuY=