forked from rlworkgroup/garage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (53 loc) · 1.86 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
56
57
58
59
60
61
62
63
language: python
services:
- docker
addons:
apt:
packages:
- docker-ce
env:
- DOCKER_COMPOSE_VERSION=1.23.2
python:
- "3.6.6"
git:
depth: false
before_install:
# Reconfigure docker to be more efficient
- |
echo '{
"experimental": true,
"storage-driver": "overlay2",
"max-concurrent-downloads": 50,
"max-concurrent-uploads": 50
}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart
# Reinstall docker compose with the specified version. For more information, see:
# https://docs.travis-ci.com/user/docker/#using-docker-compose
- 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
# Pull cached docker image
- docker pull rlworkgroup/garage-ci:latest
install:
- tag="rlworkgroup/garage-ci:${TRAVIS_BUILD_NUMBER}"
- TAG="${tag}" make build-ci
script:
- ci_env="$(bash <(curl -s https://codecov.io/env))"
- ADD_ARGS="${ci_env}" TAG="${tag}" make run-ci RUN_CMD="scripts/travisci/check_precommit.sh"
- |
if [[ "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then
ADD_ARGS="${ci_env}" TAG="${tag}" make run-ci RUN_CMD="scripts/travisci/check_cronjob_tests.sh"
else
ADD_ARGS="${ci_env}" TAG="${tag}" make run-ci RUN_CMD="scripts/travisci/check_tests.sh"
fi
- ADD_ARGS="${ci_env}" TAG="${tag}" make run-ci RUN_CMD="bash -c 'pushd docs && make html && popd'"
after_success:
- |
if [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
echo "${DOCKER_API_KEY}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
docker tag "${tag}" rlworkgroup/garage-ci:latest
docker push rlworkgroup/garage-ci
fi
notifications:
email: false