This repository has been archived by the owner on Dec 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
55 lines (46 loc) · 2.08 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
44
45
46
47
48
49
50
51
52
53
54
55
dist: trusty
sudo: required
language: minimal
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.19.0
addons:
apt:
packages:
- docker-ce
before_install:
- sudo rm -rf /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/
- sudo apt-get -q update
- sudo apt-get install -qy make apt-transport-https ca-certificates curl software-properties-common jq
before_script:
- uname -a
- type -a docker-compose && docker-compose version
- docker version
- echo "$SSHENC" | base64 -d | gpg -d --passphrase $SSHPWD --batch > /tmp/id_rsa_matchID
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/id_rsa_matchID
- ssh-add /tmp/id_rsa_matchID
- echo "Host * !""$BASTION_HOST" > ~/.ssh/config
- echo " ProxyCommand ssh -o StrictHostKeyChecking=no $BASTION_USER@$BASTION_HOST nc %h %p" >> ~/.ssh/config
- cat ~/.ssh/config
script:
- git fetch --unshallow && git tag -l
- make config build
- if [[ ( "$TRAVIS_BRANCH" == "dev" ) || ( "$TRAVIS_BRANCH" == "master" ) ]]; then
make docker-push GIT_BRANCH="$TRAVIS_BRANCH";
make deploy-local FILES_TO_PROCESS=deces-1970.txt.gz;
fi
- if [[ ( "$TRAVIS_PULL_REQUEST" = "false" ) && ( "$TRAVIS_BRANCH" == "dev" ) ]]; then
make deploy-remote FILES_TO_PROCESS=deces-1970.txt.gz GIT_BRANCH="$TRAVIS_BRANCH" NGINX_USER=$NGINX_USER NGINX_HOST=$NGINX_HOST remote_http_proxy=$REMOTE_HTTP_PROXY remote_https_proxy=$REMOTE_HTTP_PROXY remote_no_proxy=localhost NQ_TOKEN=$NQ_TOKEN;
fi
- if [[ ( "$TRAVIS_PULL_REQUEST" = "false" ) && ( "$TRAVIS_BRANCH" == "master" ) ]]; then
make deploy-remote GIT_BRANCH="$TRAVIS_BRANCH" ES_MEM=8192m SCW_IMAGE_ID=f974feac-abae-4365-b988-8ec7d1cec10d SCW_FLAVOR=C2M NGINX_USER=$NGINX_USER NGINX_HOST=$NGINX_HOST remote_http_proxy=$REMOTE_HTTP_PROXY remote_https_proxy=$REMOTE_HTTP_PROXY remote_no_proxy=localhost NQ_TOKEN=$NQ_TOKEN;
fi
after_failure:
- make clean
after_success:
- make clean-local