-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (33 loc) · 949 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
31
32
33
sudo: required
language: java
jdk:
- openjdk8
services:
- cassandra
- docker
cache:
directories:
- "$HOME/.gradle/wrapper"
- "$HOME/.gradle/native"
- "$HOME/.gradle/daemon"
- "$HOME/.gradle/caches/jars-1"
- "$HOME/.gradle/caches/jars-2"
- "$HOME/.gradle/caches/jars-3"
- "$HOME/.gradle/caches/3.4.1"
script: "./gradlew build --info"
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
after_success:
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
- export REPO=timrs2998/myretail
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH
; fi`
- docker build -f Dockerfile -t $REPO:$COMMIT .
- docker tag $REPO:$COMMIT $REPO:$TAG
- docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
- docker push $REPO
after_failure: find . -name "*.html" -exec cat {} \;
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}