-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
31 lines (31 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
language: clojure
sudo: false
branches:
only:
- master
- staging
services:
- redis-server
script:
- lein sass4clj once
- lein uberjar
before_install:
- openssl aes-256-cbc -K $encrypted_1fe7f0dcdb0a_key -iv $encrypted_1fe7f0dcdb0a_iv -in .travis/id_rsa.enc -out id_rsa -d
- mv id_rsa ~/.ssh/id_rsa
after_success:
- if [ "$TRAVIS_BRANCH" == "master" ]; then export APP="reference-prod"; fi
- if [ "$TRAVIS_BRANCH" == "staging" ]; then export APP="reference-stg"; fi
- echo "Deploying to $SERVER"
- mv .travis/known_hosts ~/.ssh/known_hosts
- mv .travis/id_rsa.pub ~/.ssh/id_rsa.pub
- chmod 400 ~/.ssh/known_hosts
- chmod 400 ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa.pub
- ssh-add ~/.ssh/id_rsa
- scp target/reference-3.0.0-standalone.jar [email protected]:/apps/$APP/reference-3.0.0-standalone.jar
- scp target/reference-3.0.0-standalone.jar [email protected]:/apps/$APP/reference-3.0.0-standalone.jar
- ssh [email protected] "supervisorctl restart $APP"
- ssh [email protected] "supervisorctl restart $APP"
notifications:
slack:
secure: eewE3FcToXLQj/qkqvqD4pKYKNcH9w0Q81+K66ieGSzIh31yJlbnjIMRLrA3vvXWzzVjmVcz3rKFU1HztZTYT6s632fbHUOI7OxRwCIXplAhjMqMIuMsu7JPbQfpeQ5YBG6sz5oyDVPOVbRy4irauOx5HDEAr2YikR/878qW7Lo=