-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
28 lines (28 loc) · 948 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
26
27
28
language: clojure
script: lein uberjar
sudo: false
branches:
only:
- staging
cache:
directories:
- $HOME/.m2
before_install:
- openssl aes-256-cbc -K $encrypted_134e2e7eeaf1_key -iv $encrypted_134e2e7eeaf1_iv -in .travis/id_rsa.enc -out id_rsa -d
- mv id_rsa .travis/id_rsa
after_success:
- if [ "$TRAVIS_BRANCH" == "staging" ]; then export APP="export-server-public-stg"; fi
- echo "Deploying to $SERVER"
- cp .travis/known_hosts ~/.ssh/known_hosts
- cp .travis/id_rsa.pub ~/.ssh/id_rsa.pub
- cp .travis/id_rsa ~/.ssh/id_rsa
- chmod 600 ~/.ssh/known_hosts
- chmod 600 ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa.pub
- chmod 600 .travis/id_rsa
- chmod 600 .travis/id_rsa.pub
- ssh-add ~/.ssh/id_rsa
- scp -i .travis/id_rsa target/export-server-standalone.jar root@104.131.77.49:/apps/$APP/export-server-standalone.jar
- ssh -v -v -v root@104.131.77.49 "supervisorctl restart $APP"
notifications:
slack: anychart-team:sJRPhNn8Ur8yVdhvhgp6EbDM