-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.capistrano.travis.yml
42 lines (42 loc) · 2.5 KB
/
.capistrano.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
sudo: false
dist: trusty
language: ruby
rvm:
- 2.5.5
addons:
postgresql: '9.6'
cache:
- bundler
before_install:
- gem update --system --quiet
- gem install bundler -v "~>2.0.1" --no-document
install:
- bundle install --jobs 16
branches:
only:
- master
before_script:
- psql -c 'create database inquiries_maker_test;' -U postgres
- cp config/database.travis.yml config/database.yml
- RAILS_ENV=test bundle exec rake db:create db:migrate
- bundle exec rspec
script:
- openssl aes-256-cbc -k $DEPLOY_KEY -in config/deploy_id_rsa_enc_travis -d -a -out config/deploy_id_rsa
- chmod 600 config/deploy_id_rsa
- eval "$(ssh-agent -s)"
- ssh-add config/deploy_id_rsa
- echo "Ready to deploy! ✅"
after_success:
- "[[ $TRAVIS_BRANCH = 'master' ]] && bundle exec cap production deploy"
- "[[ $TRAVIS_BRANCH = 'master' ]] && bundle exec cap production workers:stop"
- "[[ $TRAVIS_BRANCH = 'master' ]] && bundle exec cap production workers:start"
- "[[ $TRAVIS_BRANCH = 'master' ]] && bundle exec cap production workers:ids"
after_failure:
- echo "Can not deploy! ❌"
after_script:
- bundle exec cap production notify:telegram
- echo "All done! 💚"
env:
global:
- secure: V0Ad6+BwFi945Z3+obIp72cTh8oYozR/oEr8IUJU7VRaK90pbQ+WDK5sqnUQ/IpC5rVD3XNascXf1STmD3D+wPuv4RYTTwmL2QFak8avWkEg898RgPYKpQjUWdKwJ5tAouxq3NIRzNnhCsSiRhiI5I7vD7lbmeW3rohNxz9zJCGlmzviQQP8OhiF8SyBQlq3fLzws7QFCyurie36M6+PZh9okk2AXjl+jDWqXNNS81mDCM2JOVPwzb5OEOEf8FY7S2rl43+izvV3bmA2p1Ug0rwU9sjJkNwtBAKnVV49M8fVlu3y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