forked from strongbox/strongbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (54 loc) · 2.01 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
56
57
58
59
60
61
62
matrix:
include:
- os: osx
# This version comes with oracle jdk8
osx_image: xcode9.3
language: java
jdk:
# Not all JDKs are supported on MacOS - https://docs.travis-ci.com/user/languages/java/#testing-against-multiple-jdks
- oraclejdk8
cache:
directories:
- $HOME/.m2
# We don't need to cache artifacts generated during the build.
before_cache:
- rm -rf $HOME/.m2/repository/org/carlspring/strongbox
before_install:
- >
mkdir -p $HOME/.m2;
curl -o $HOME/.m2/settings.xml https://strongbox.github.io/assets/resources/maven/settings.xml;
curl -o $HOME/.m2/maven.tar.gz https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz;
(cd $HOME/.m2/ ; tar xzf maven.tar.gz);
ln -s $HOME/.m2/apache-maven-3.6.3/bin/mvn $HOME/mvn;
$HOME/mvn -version;
# Can't run on windows yet because of:
# https://travis-ci.community/t/windows-build-long-path-for-files/757
#- os: windows
# language: shell
#
# This will be ran on all matrices.
#
git:
depth: 1
# Skip default `install` step
install: true
# Build must produce logs or the VM will be terminated in 10 minutes.
before_script:
- while sleep 120; do printf "[ %ss ] maven is still running...\n" `date +%H:%M:%S`; done &
# Use openjdk8 for this build (version should be >= u222)
script:
- wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u275-b01/OpenJDK8U-jdk_x64_mac_hotspot_8u275b01.tar.gz
- tar -xf OpenJDK8U-jdk_x64_mac_hotspot_8u275b01.tar.gz
- export JAVA_HOME="$PWD/jdk8u275-b01/Contents/Home"
- java -version
- $HOME/mvn -V clean install -Dintegration.tests -T 2 -Daether.connector.resumeDownloads=false --log-file=build.log
after_failure:
# Killing sleep loop
- kill %1 2>&1
- echo "Build has failed!"
- tail -n 1000 build.log
after_success:
# Killing sleep loop
- kill %1 2>&1
- echo "Build was successful!"
- tail -n 500 build.log