-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml.old
67 lines (57 loc) · 2.46 KB
/
.travis.yml.old
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
64
65
66
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
- if [[ ( "$TRAVIS_PULL_REQUEST" == "false" ) && ( "$TRAVIS_BRANCH" == "tuto" ) ]]; 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;
cat ~/.ssh/config;
fi
script:
- git fetch && git tag -l
- make backend-docker-check || ( make backend-build && make backend backend-stop)
- if [[ ( "$TRAVIS_PULL_REQUEST" == "false" ) && ( ( "$TRAVIS_BRANCH" == "tuto" ) || ( "$TRAVIS_BRANCH" == "master" ) || ( "$TRAVIS_BRANCH" == "dev" ) ) ]]; then
make backend-docker-push GIT_BRANCH="$TRAVIS_BRANCH";
if [[ ( "$TRAVIS_BRANCH" == "master" ) ]]; then
make package-publish GIT_BRANCH="$TRAVIS_BRANCH" STORAGE_ACCES_KEY=$STORAGE_ACCES_KEY STORAGE_SECRET_KEY=$STORAGE_SECRET_KEY;
fi
fi
after_sucess:
- if [[ ( "$TRAVIS_PULL_REQUEST" == "false" ) && ( "$TRAVIS_BRANCH" == "tuto" ) ]]; then
make deploy-remote
NO_AUTH=$NO_AUTH ADMIN_PASSWORD_HASH=$ADMIN_PASSWORD_HASH
FACEBOOK_OAUTH_ID=$FACEBOOK_OAUTH_ID FACEBOOK_OAUTH_SECRET=$FACEBOOK_OAUTH_SECRET
GITHUB_OAUTH_ID=$GITHUB_OAUTH_ID GITHUB_OAUTH_SECRET=$GITHUB_OAUTH_SECRET
GIT_BRANCH="$TRAVIS_BRANCH"
APP_DNS=$APP_DNS NGINX_USER=$NGINX_USER NGINX_HOST=$NGINX_HOST
SCW_FLAVOR=$SCW_FLAVOR
remote_http_proxy=$REMOTE_HTTP_PROXY remote_https_proxy=$REMOTE_HTTP_PROXY remote_no_proxy=localhost
NQ_TOKEN=$NQ_TOKEN;
fi
after_failure:
- if [[ ( "$TRAVIS_PULL_REQUEST" = "false" ) && ( "$TRAVIS_BRANCH" == "tuto" ) ]]; then
make clean-remote;
fi
- make clean