-
Notifications
You must be signed in to change notification settings - Fork 0
/
.old_travis.yml
61 lines (59 loc) · 1.96 KB
/
.old_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
dist: bionic
language: elixir
elixir: '1.7'
otp_release: '21.0'
addons:
postgresql: "12"
apt:
packages:
- postgresql-12
- postgresql-client-12
env:
global:
- PGPORT=5433
jobs:
include:
- &test-stage
stage: test
env: MIX_ENV=test
services: &1
- postgresql
before_script: &2
- psql -U postgres -c "ALTER USER postgres WITH PASSWORD 'mysecretpassword';"
script: &3
- mix coveralls.json
after_success:
- bash <(curl -s https://codecov.io/bash)
- <<: *test-stage
env: MIX_ENV=integration
- stage: docker
services:
- docker
env: MIX_ENV=prod
install: skip
if: branch = master
script:
- docker build -t wanon:latest .
- docker tag wanon:latest cloud.canister.io:5000/graffic/wanon:latest
- echo "$CANISTER_PASSWORD" | docker login -u "$CANISTER_USERNAME" --password-stdin
cloud.canister.io:5000
- docker push cloud.canister.io:5000/graffic/wanon:latest
- stage: deploy
install: skip
if: NOT commit_message =~ /\[skip deploy\]/ AND branch = master
before_script:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- openssl aes-256-cbc -K $encrypted_4deb83d14026_key -iv $encrypted_4deb83d14026_iv
-in deploy_key.enc -out deploy_key -d
script:
- curl -L https://github.com/dvddarias/rdocker/raw/master/rdocker.sh > rdocker
- chmod +x rdocker
- chmod 400 deploy_key
- eval "$(ssh-agent -s)"
- echo -e "StrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./deploy_key
- ./rdocker $DEPLOY_HOST docker login -u "$CANISTER_USERNAME" --password "$CANISTER_PASSWORD" cloud.canister.io:5000
- ./rdocker $DEPLOY_HOST docker stack deploy --with-registry-auth -c docker-compose.yml wanon