forked from eclipse-ditto/ditto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·33 lines (33 loc) · 2.04 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
dist: trusty
sudo: required
language: java
jdk:
- oraclejdk8
services:
- docker
before_install:
- cp .travis.settings.xml $HOME/.m2/settings.xml
install: true
script:
- if [ ! -n "$TRAVIS_TAG" ]; then
mvn install javadoc:jar source:jar --batch-mode --errors --quiet -Pbuild-documentation -DcreateJavadoc=true;
fi;
- if [ -n "$TRAVIS_TAG" ]; then
export IMAGE_TAG=$TRAVIS_TAG;
docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_PASSWORD";
docker build -f services/Dockerfile --build-arg SERVICE_STARTER=ditto-services-policies-starter --build-arg SERVICE_VERSION=$IMAGE_TAG -t eclipse/ditto-policies:$IMAGE_TAG -t eclipse/ditto-policies:latest .;
docker build -f services/Dockerfile --build-arg SERVICE_STARTER=ditto-services-things-starter --build-arg SERVICE_VERSION=$IMAGE_TAG -t eclipse/ditto-things:$IMAGE_TAG -t eclipse/ditto-things:latest .;
docker build -f services/Dockerfile --build-arg SERVICE_STARTER=ditto-services-thingsearch-starter --build-arg SERVICE_VERSION=$IMAGE_TAG -t eclipse/ditto-things-search:$IMAGE_TAG -t eclipse/ditto-things-search:latest .;
docker build -f services/Dockerfile --build-arg SERVICE_STARTER=ditto-services-gateway-starter --build-arg SERVICE_VERSION=$IMAGE_TAG -t eclipse/ditto-gateway:$IMAGE_TAG -t eclipse/ditto-gateway:latest .;
docker build -f services/Dockerfile --build-arg SERVICE_STARTER=ditto-services-amqpbridge-starter --build-arg SERVICE_VERSION=$IMAGE_TAG -t eclipse/ditto-amqp-bridge:$IMAGE_TAG -t eclipse/ditto-amqp-bridge:latest .;
docker push eclipse/ditto-policies:$IMAGE_TAG;
docker push eclipse/ditto-policies:latest;
docker push eclipse/ditto-things:$IMAGE_TAG;
docker push eclipse/ditto-things:latest;
docker push eclipse/ditto-things-search:$IMAGE_TAG;
docker push eclipse/ditto-things-search:latest;
docker push eclipse/ditto-gateway:$IMAGE_TAG;
docker push eclipse/ditto-gateway:latest;
docker push eclipse/ditto-amqp-bridge:$IMAGE_TAG;
docker push eclipse/ditto-amqp-bridge:latest;
fi;