-
Notifications
You must be signed in to change notification settings - Fork 40
/
.travis.yml
55 lines (48 loc) · 2.41 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
sudo: required
dist: trusty
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2/repository
- $HOME/.m2/wrapper
- ui/target/gulp-build/libs
- ui/target/gulp-build/node_modules
notifications:
irc:
channels:
- chat.freenode.net#hawkular
on_success: change
install:
- ./mvnw -version -B
# unshallow is needed by license-maven-plugin
- git fetch origin --unshallow
script:
- ./mvnw -s .travis.maven.settings.xml verify | grep -vF "[INFO] Downloading:" | grep -vF "[INFO] Downloaded:"; test ${PIPESTATUS[0]} -eq 0
env:
global:
# Github deploy token
- secure: T75Ketb2d0BIgRIMoi06FjL2pIfDMYCsUivJ2r1a3mXpkCxti0OcOk/ODmoHWsKrg1RU0RZ6ayJ0MygMhL5zBi4kI6P1x7nzrJsHLqndWxAP77oWsHSSCxI7i26VPLt4hCluBnLKqWX2mTlk8w3MMsbsXrgeV5/HpKZwXZQb8BE=
# Nexus deploy tokens
- secure: LQS+PsFgOMoMtUOPpQF1UotdO3I17Y5nSSqXn56MKA2OvPBWX4ANBe/tKcnkHKDs4+FV3i5d08xxjBIsu/pfQsNedXjhx/B2CZG301oumWyCKukgJ3FIf2IXoN69TDWHU4SSStfck7enbM2G9TV7IHyHL+4x5LIo2xJ+7xL9GxU=
- secure: W+HwWNFJHw0eXemHopbghj4cFz4WlBxb4aqsErE6DF0MjUfO27BVYy12lSZ/fMU4JpCOVwaceoNu9n2QnaenQkkEFDN4+N+fTpU2EK676NPcYxDYWFm6R6FRQtC75fWh4qT80PwtFLdaqEHtS5yOMx8aQHtFvHwbuGtLBdwwqmQ=
before_cache:
# Clean the cached directories once their size exceeds the space left on the partition.
# This is important because Travis zips the chached directories to a temporary file on the same partition.
# Note that while we consider the summed size of all cached dirs, we remove only those ones that tend to grow over time
- CACHED_DIRECTORIES=("$HOME/.m2/repository" "$HOME/.m2/wrapper")
- availBytes=$(df -P . | tail -1 | awk '{print $4}')
- cachedBytes=$(du -cs "${CACHED_DIRECTORIES[@]}" | tail -1 | awk '{print $1}')
- echo "Checking if the size of directories to cache ${cachedBytes} Bytes exceeds the free space ${availBytes} Bytes left on the current partition"
- if [ "${cachedBytes}" -gt "${availBytes}" ] ; then
echo "Cleaning the cached dirs (${cachedBytes} Bytes) because their size exceeds the free space (${availBytes} Bytes) left on the current partition"
rm -Rf "$HOME/.m2"
fi
after_success:
- PROJECT_VERSION=`./mvnw --batch-mode org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['`
- if [[ "$PROJECT_VERSION" =~ .*SNAPSHOT ]] && [[ "${TRAVIS_BRANCH}" = "master" ]] && [[ "${TRAVIS_PULL_REQUEST}" = "false" ]];
then
./mvnw -s .travis.maven.settings.xml deploy -DskipTests ;
./.travis.swagger.sh ;
fi