-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (83 loc) · 3.74 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
language: node_js
dist: trusty
node_js:
- 12.13.0
addons:
apt:
packages:
- python-pip
notifications:
email: false
slack:
rooms:
- gapminder:siB4Z9ymsYR6qHnRPpgUoB2Q#vizabi-spam
on_success: change
on_failure: always
cache:
directories:
- node_modules
before_install:
- ssh-keyscan -H $TOOLSPAGE_HOST 2>&1 | tee -a $HOME/.ssh/known_hosts
# this is created by travis encrypt command when adding npm api_key
- openssl aes-256-cbc -K $encrypted_6f3bd6d63370_key -iv $encrypted_6f3bd6d63370_iv
-in deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
- sudo pip install s3cmd
install:
- npm install --ignore-scripts
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- tool-bump
- npm run build
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
deploy:
#
# put build files on s3 into a versioned folder
#
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key:
secure: Cp30OFVtxwZLW7Vgr9SAGCFfRjXUkJ3XPnPD/2ted9XNHFHCYOHe5KJH+D8IffN0h/xdC44wp8ClRqdQHpRcsEhATuYi78F2Sp3i89mzCpV8LeaLMUhc+9A4WxM7aR6byLfqmCxEdlBRNUp0xltu221otARmsyrkaZ6BmzpUh63wLlQv1wtVgzaS1ZKE1a1KfMxnkzW/QJaSUqiw3zCkxeoekpvp7dvk0LZKTirP7yeJZcSLNlLxTxxoz/qwROClzhCt5sVWl1tssZOAO/Edjv1cZ//Ih3NHFZO3jqraRY4ctoji8RG+3LTTTzJgcwqUlMvF3GZQtVhbxE673LZdmVp5CGwLFu17vtwwBO2j1WBRmlDgtuFuZRv4rAdcD2ERTf9CoOkoXM7r3rUW0+lY7xWpdUvSx5xjc3qLT5lqu5aW9SG7C0MMlE7DugRUnasl7rYtLWk/fx1JnifJ8rQP+svqCdt2PBZKCXQ05KBzaMHQRzH35juIPBKYRSMsGjrSYTxXo8z+LM6+gtyrcKZIiOZPiwFFLrRvHSxA88JSFXzVCoARcVo0tNlU3OcU3VipN/1AKxnxL+SjXC9ApP1jwAvKPcc/1ZEEBbmFlIMgcdWLv7H9ZMovgpObiXKBIONTthyVjowr8fHS3eApyunaZlh5n+wqBUtM9hBbdTED7U0=
bucket: $AWS_BUCKET
upload-dir: $AWS_SUBFOLDER/$PACKAGE_VERSION
region: eu-west-1
skip_cleanup: true
local_dir: build
on:
branch: master
#
# put build files on s3 as latest version
#
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key:
secure: Cp30OFVtxwZLW7Vgr9SAGCFfRjXUkJ3XPnPD/2ted9XNHFHCYOHe5KJH+D8IffN0h/xdC44wp8ClRqdQHpRcsEhATuYi78F2Sp3i89mzCpV8LeaLMUhc+9A4WxM7aR6byLfqmCxEdlBRNUp0xltu221otARmsyrkaZ6BmzpUh63wLlQv1wtVgzaS1ZKE1a1KfMxnkzW/QJaSUqiw3zCkxeoekpvp7dvk0LZKTirP7yeJZcSLNlLxTxxoz/qwROClzhCt5sVWl1tssZOAO/Edjv1cZ//Ih3NHFZO3jqraRY4ctoji8RG+3LTTTzJgcwqUlMvF3GZQtVhbxE673LZdmVp5CGwLFu17vtwwBO2j1WBRmlDgtuFuZRv4rAdcD2ERTf9CoOkoXM7r3rUW0+lY7xWpdUvSx5xjc3qLT5lqu5aW9SG7C0MMlE7DugRUnasl7rYtLWk/fx1JnifJ8rQP+svqCdt2PBZKCXQ05KBzaMHQRzH35juIPBKYRSMsGjrSYTxXo8z+LM6+gtyrcKZIiOZPiwFFLrRvHSxA88JSFXzVCoARcVo0tNlU3OcU3VipN/1AKxnxL+SjXC9ApP1jwAvKPcc/1ZEEBbmFlIMgcdWLv7H9ZMovgpObiXKBIONTthyVjowr8fHS3eApyunaZlh5n+wqBUtM9hBbdTED7U0=
bucket: $AWS_BUCKET
upload-dir: $AWS_SUBFOLDER
region: eu-west-1
skip_cleanup: true
local_dir: build
on:
branch: master
#
# npm deploy
#
- provider: npm
email: [email protected]
api_key:
secure: a5ijG8Q6ENhCnXBjkULl9KBZxyrn+KAp0K6CzTvwekKvSPbjFOoH45VeIy5y29yQAdKSvqouh7SBjHFI29M6LpXeqWiBcWHXDcAUrCHA/IbZL/al4F1OO7as2Ay02KKyKBzaHGAUA9BOecPo8P4k8zL8W6BYhm/HmwmoO3R/iZzUoAyaSHuZ5ya7wCvEo8caZMzy5fX9jbz9brC69XvnDoZvbS5NkFsrUVllUU0ASINkCamXGy2q0ghsPYalGm4I0TOTpAlPHOevQRl+/1vU148/RZWFLOyyBS9z0T4THgp+A8f4VvtkVjGlYRgUusVnBnm6p5jKSEgaXjzhzPB5sjksCy2UlLgfEHZXJB+Rulp3Qel4vwBm9rEWsAf6ZUgDHd/pkOp0vTAn9WNSmChW1plO2Wr8YIEXoolFfHTBbh1qVV9pwwmxJmjAhUeKuV8lk/Vf+3vNuyUWxtqVdpjBolY3bWiVSpdlVLz1Nb383K61jGN1B9t4cvKusAe6Dsu8GKr6DMh9iX+tFMAdexkEKVwktuPByN22NgtQZ8SDBKFj02srq/cVLf8UTJhYSwWKXBjEe53Chsv4By8jBF2z1Ny8C9HyibNliAqk8WnUDRSWlxVJhjWGZx06OGmHUHGuGL6x4Z4+jB5BIeIMPhUnG2SJaY4kj5dNh3l7X3hLaqY=
skip_cleanup: true
on:
branch: master
#
# rebuild tools page dev
#
- provider: script
script: ssh $TOOLSPAGE_USER@$TOOLSPAGE_HOST 'sh /home/root/redeploy.sh "$TRAVIS_REPO_SLUG"'
skip_cleanup: true
on:
branch: master