-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml.off
63 lines (54 loc) · 2.63 KB
/
.travis.yml.off
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
60
61
62
63
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
- ping $BASTION_HOST;
- ping api.scaleway.com;
- if [[ ( "$TRAVIS_PULL_REQUEST" = "false" ) && ( ( "$TRAVIS_BRANCH" == "dev" ) || ( "$TRAVIS_BRANCH" == "master" ) ) ]]; then
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;
echo "Host $BASTION_HOST" >> ~/.ssh/config;
fi
script:
- git fetch && git describe --tags
- make config
- (make docker-check || make build) || travis_terminate 1;
- make deploy-local FILES_TO_PROCESS=deces-2020-m01.txt.gz || travis_terminate 1;
- if [[ ( "$TRAVIS_PULL_REQUEST" = "false" ) ]]; then
make docker-push GIT_BRANCH="$TRAVIS_BRANCH" || travis_terminate 1;
fi
- if [[ ( "$TRAVIS_PULL_REQUEST" = "false" ) && ( "$TRAVIS_BRANCH" == "dev" ) ]]; then
make deploy-remote FILES_TO_PROCESS=deces-2020-m[0-1][0-9].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 GOOGLE_ANALYTICS_ID=$GOOGLE_ANALYTICS_ID;
fi
- if [[ ( "$TRAVIS_PULL_REQUEST" = "false" ) && ( "$TRAVIS_BRANCH" == "master" ) ]]; then
make deploy-remote GIT_BRANCH="$TRAVIS_BRANCH" GIT_BACKEND_BRANCH=master ES_MEM=$ES_MEM SCW_IMAGE_ID=$SCW_IMAGE_ID SCW_FLAVOR=$SCW_FLAVOR 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 GOOGLE_ANALYTICS_ID=$GOOGLE_ANALYTICS_ID;
fi
after_failure:
- make clean
- if [[ ( "$TRAVIS_PULL_REQUEST" = "false" ) && (( "$TRAVIS_BRANCH" == "dev" ) || ( "$TRAVIS_BRANCH" == "master" ))]]; then
make clean-remote;
fi
after_success:
- make clean-local