-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
41 lines (41 loc) · 1.2 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
language: node_js
sudo: required
services:
- docker
env:
- SH="docker exec -t aviary-api bash -c"
before_install:
- docker run --detach --name aviary-api -v $(pwd):/travis -w /travis node:8-stretch-slim
tail -f /dev/null
- docker ps
addons:
apt:
update: true
packages:
- unzip
on:
branch: master
install:
- npm install
script: skip
after_failure:
- curl -X POST -d 'message="aviary-api build failed"' https://${HOME_API_USER}:${HOME_API_AUTHKEY}@$REMOTE_SERVER}/api/pushover
after_success:
- curl -X POST -d 'message="aviary-api build successful"' https://${HOME_API_USER}:${HOME_API_AUTHKEY}@${REMOTE_SERVER}/api/pushover
before_deploy:
- curl -L -o deploy.zip https://www.dropbox.com/sh/b3bythz0yqwnhlc/AACDP-p59V-abED0KOrT7aGMa?dl=0
- unzip deploy.zip -x /
- openssl aes-256-cbc -K ${SSL_KEY} -iv ${SSL_IV} -in secrets.enc -out id_rsa -d
- $SH "npm run bundle"
- which ssh-agent || ( sudo apt-get update -qy && apt-get install --no-install-recommends
-qfy openssh-client git )
- mkdir -p ~/.ssh
- mv id_rsa ~/.ssh/id_rsa
- sudo chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $REMOTE_SERVER > ~/.ssh/known_hosts
deploy:
skip_cleanup: true
provider: script
script: bash deploy.sh
on:
branch: master