forked from openstack4j/openstack4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (39 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
dist: bionic
# Cache maven cache directory so external artifacts dont need to be
# re-downloaded.
cache:
directories:
- $HOME/.m2
language: java
jdk:
- openjdk8
env:
global:
- DEPLOY=1
notifications:
email: false
install: /bin/true
script:
- |
set -x
# TRAVIS_BRANCH is name of the branch built OR the name of the target branch in case of PRs
if [ "$TRAVIS_BRANCH" == "master" -a -z "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
echo "Run sonar analysis for master only"
jacoco_goal="org.jacoco:jacoco-maven-plugin:prepare-agent"
sonar_goal="org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar"
sonar_opts="-Dsonar.projectKey=openstack4j_openstack4j"
else
echo "Skipping sonar analysis"
fi
mvn -B clean $jacoco_goal install $sonar_goal $sonar_opts
after_success:
- "set -x; [[ $DEPLOY == 1 && $TRAVIS_BRANCH == \"master\" ]] && { mvn deploy --settings distribution/settings.xml -DskipTests=true -B; };"
# disable sudo to ensure that this build runs on the travis container-based
# infrastructure. This should prevent the buffer overflow from
# https://github.com/travis-ci/travis-ci/issues/5227
sudo: false
addons:
sonarcloud: # Report coverage results to sonarcloud.io
organization: "openstack4j"
token:
secure: "S9xKYmp0TYrzEozGaNqYE3e6hSBV3nDnA1oy3V5vWXW8U1EYFy/kkQbkqN4s6xDkM0nWbbHm23INkTOrhl8clUxBeWt7Mt1PKeH45PgkCbS0oZoIvSlmASKxXsKkK34MniF6yOsn4+Z0iqAr4E2sdxcPmP1mT4I2pQJs4eRpmUy7SfUomBjd1TcV/r2DKlh6SUspJEi6NwnSdGr41gw1vbjtgTJBUmsvw9N04VCH1if8vgxrZGfkV1EjqJ3/SS7C+lLfdJQgUp4JFKrEoBU6RIwwBciKfW/3+jDuR5Lk6FbpSe4Vv98iGBw4NP079InLu6asglY2nEt8U9WC9BoTyVqCdCooz4j8b/FNyXU9cYEnNlOvtJ7vM9/BxZOqUplR4xpb9oMLLkWeT8N5OJCnCOyrk4myRSXEhLyX4SOj3gT+uxWhdBBbyH3XGrFMVci1WOe7upKUpM2MRsk7Ura0Xf7keiC13DFHdT3Hm+vIyEnzClk48TzIyvNVLuOBoBn5Ka0S5yBD8MKp0/FmoK1kuNtEhI5a877R/PF3ZxY2OxLyrUrAu0SL1Ncaz9Gyekcqa8V5yOVTyKF/fUErqd51u58Me23U1Hu2qjKk/TK3fFcK9Y8byvVqUGoVyLhW3uc3idPhCDiC6RvLn+FIsQ0rg5zOGMVJ4nDKw40UQ22ar78="