forked from lucrussell/docker-druid
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
30 lines (25 loc) · 994 Bytes
/
.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
---
sudo: required
language: bash
services:
- docker
# Build the image, then spin up a druid stack for testing the image
before_install:
- docker build -t rusnyder/druid .
- docker-compose -f docker-compose.test.yml up -d
# If the stack comes up, we can run the 'sut' (system under test) which
# will check that the broker is up and functional
script:
- docker-compose -f docker-compose.test.yml run sut 2>/dev/null | grep io.druid
after_success:
# Push master builds to Docker Hub
- if [[ -n "$TRAVIS_TAG" ]] && [[ "$TRAVIS_TAG" =~ ^release/.*$ ]]; then
DOCKER_TAG=$(echo "$TRAVIS_TAG" | sed -e 's:release/::');
elif [[ "$TRAVIS_BRANCH" == "master" ]]; then
DOCKER_TAG=latest;
fi;
if [[ -n "$DOCKER_TAG" ]]; then
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin;
docker push rusnyder/druid:$DOCKER_TAG;
curl -XPOST "https://hooks.microbadger.com/images/rusnyder/druid/92E6HVksxr9Nx2MKCj2qo0DkUYo=";
fi;