forked from alephdata/aleph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (43 loc) · 1.57 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
sudo: required
services:
- docker
env:
global:
- ALEPH_DATABASE_NAME=aleph
- ALEPH_DATABASE_URI=postgresql://localhost/$ALEPH_DATABASE_NAME
- DOCKER_COMPOSE_VERSION=1.23.1
- DOCKER_IMAGE_NAME=alephdata/aleph
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- sudo sysctl -w vm.max_map_count=262144
- 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
- sudo echo "ALEPH_DATABASE_NAME=$ALEPH_DATABASE_NAME\nALEPH_DATABASE_URI=$ALEPH_DATABASE_URI\nOAUTH_KEY=$OAUTH_KEY\nOAUTH_SECRET=$OAUTH_SECRET" >> aleph.env
- docker --version
- docker-compose --version
- make docker-pull
install:
- echo "${TRAVIS_BRANCH}"
- make build
- docker-compose -f docker-compose.dev.yml up -d postgres elasticsearch extract-entities
- sleep 4
script:
- make test
after_success:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- if [[ $TRAVIS_BRANCH = "master" ]]; then
make TAG=master build-full docker-push ;
fi
- if [[ $TRAVIS_BRANCH = "develop" ]]; then
make TAG=develop build-full docker-push ;
fi
- if [[ $TRAVIS_TAG = $TRAVIS_BRANCH ]]; then
make TAG=$TRAVIS_TAG build-full docker-push ;
make build-full docker-push ;
fi
- if [[ $TRAVIS_BRANCH = "occrp/production" ]]; then
make TAG=occrp build-full docker-push ;
fi