forked from Connected-Places/admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (49 loc) · 1.57 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
os: linux
dist: xenial
branches:
only:
# Tagged releases
- /^[0-9]{4}\.[0-9]{2}\.[0-9]{2}\.[0-9]+$/
# Master
- master
# Release branches
- /^release\/.+$/
# Develop
- develop
language: node_js
node_js:
- 14
cache:
directories:
- node_modules
install:
- npm ci
script:
- echo "No tests ran"
before_deploy:
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
- unzip awscliv2.zip
- sudo ./aws/install
- export PATH=$PATH:/usr/local/bin
- echo aws --version
deploy:
# Tagged releases
- provider: script
script: ENVIRONMENT=production AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_PRODUCTION AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_PRODUCTION AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION_PRODUCTION bash .travis/deploy.sh
skip_cleanup: true
on:
all_branches: true
condition: ${TRAVIS_TAG} =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}\.[0-9]+$
# Release branches
- provider: script
script: ENVIRONMENT=release AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_RELEASE AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_RELEASE AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION_RELEASE bash .travis/deploy.sh
skip_cleanup: true
on:
all_branches: true
condition: ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} =~ ^release\/.+$
# Develop
- provider: script
script: ENVIRONMENT=staging AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID_STAGING AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY_STAGING AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION_STAGING bash .travis/deploy.sh
skip_cleanup: true
on:
branch: develop