-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (36 loc) · 1.07 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
42
43
# https://github.com/dwyl/learn-travis/blob/master/encrypted-ssh-keys-deployment.md
language: generic
env:
- DOCKER_COMPOSE_VERSION=1.23.2
services:
- docker
branches:
only:
- master
- development
stages:
- name: test
- name: build-deploy
if: branch = master AND type = push
before_install:
- openssl aes-256-cbc -K $encrypted_9c418710e3f6_key -iv $encrypted_9c418710e3f6_iv
-in ./travis/deploy_key.enc -out ./travis/deploy_key -d
- eval "$(ssh-agent)"
- chmod 600 ./travis/deploy_key
- echo -e "Host $SSH_HOST\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./travis/deploy_key
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
jobs:
include:
- stage: test
script:
- make install
- make test
- stage: build-deploy
script:
- make build-image
- make push-image
- make deploy