forked from georocket/georocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (29 loc) · 1.17 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
language: java
sudo: required
services:
- docker
jdk:
- oraclejdk8
script:
- ./gradlew check installDist &&
cp docker/.dockerignore georocket-server/build/install/.dockerignore &&
cp docker/Dockerfile georocket-server/build/install/Dockerfile &&
docker build -t georocket/georocket georocket-server/build/install &&
cd georocket-server/integration-tests &&
./test.sh &&
cd ../.. &&
if [ "$TRAVIS_REPO_SLUG" == "georocket/georocket" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [[ $(./gradlew -q :georocket-server:getVersion) == *SNAPSHOT* ]]; then
./gradlew upload;
fi &&
if [ "$TRAVIS_REPO_SLUG" == "georocket/georocket" ] && ([ "$TRAVIS_BRANCH" == "master" ] || [ ! -z "$TRAVIS_TAG" ]) && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" &&
docker push georocket/georocket;
fi
# see also https://docs.travis-ci.com/user/languages/java/#Caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -rf $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/