-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
58 lines (50 loc) · 1.59 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
sudo: required
services:
- docker
# This version will be also tagged as 'latest'
env:
global:
- LATEST="0.8.3"
# Builds released versions from: https://github.com/druid-io/tranquility
matrix:
include:
- env: TRANQUILITY_VERSION=0.8.3
- env: TRANQUILITY_VERSION=0.8.2
- env: TRANQUILITY_VERSION=0.8.1
- env: TRANQUILITY_VERSION=0.8.0
install:
- docker --version
- docker-compose --version
- echo "TRANQUILITY VERSION $TRANQUILITY_VERSION"
- echo "LATEST VERSION $LATEST"
- export CURRENT=${TRANQUILITY_VERSION}
- docker build
--build-arg tranqulity_version=${TRANQUILITY_VERSION}
--build-arg vcs_ref=$TRAVIS_COMMIT
--build-arg build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
-t rusnyder/tranquility .
before_script:
- docker-compose -f test/docker-compose.yml up -d zookeeper
script:
# Shellcheck main source files
- shellcheck -s bash start-tranquility.sh
# Spin up the container under test
- docker-compose -f test/docker-compose.yml up -d tranquility
- docker-compose -f test/docker-compose.yml ps
# Check that tranquility is up and listening (smoke test)
- test/wait-for-it.sh -t 60 localhost:8200
after_script:
- docker-compose down
# This will deploy from master. Might want to have a single release branch for a little more control
deploy:
- provider: script
script: bash docker_push latest
on:
repo: rusnyder/docker-tranquility
branch: master
condition: $CURRENT = $LATEST
- provider: script
script: bash docker_push "${TRANQUILITY_VERSION}"
on:
repo: rusnyder/docker-tranquility
# branch: release