File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change
1
+ dist : trusty
2
+ sudo : required
3
+
1
4
language : java
2
5
3
6
jdk :
4
7
- oraclejdk8
5
8
6
9
addons :
7
- apt :
8
- packages :
9
- - oracle-java8-installer
10
+ sonarqube :
11
+ organization : racodond-github
12
+ token :
13
+ secure : ...
14
+ github_token :
15
+ secure : ...
10
16
11
17
env :
12
18
global :
20
26
cache :
21
27
directories :
22
28
- ' $HOME/.m2/repository'
29
+ - ' $HOME/.sonar/cache'
23
30
24
31
script : ./travis.sh
Original file line number Diff line number Diff line change @@ -4,6 +4,18 @@ set -euo pipefail
4
4
5
5
mvn -B clean install
6
6
7
+ if [ " $TRAVIS_PULL_REQUEST " != " false" ] && [ " $SQ_VERSION " == " LTS" ]; then
8
+ mvn -B sonar:sonar \
9
+ -Dsonar.host.url=https://sonarcloud.io \
10
+ -Dsonar.analysis.mode=preview \
11
+ -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \
12
+ -Dsonar.github.repository=$TRAVIS_REPO_SLUG \
13
+ -Dsonar.github.oauth=$GITHUB_TOKEN \
14
+ -Dsonar.login=$SONAR_TOKEN
15
+
16
+ elif [ " $TRAVIS_BRANCH " == " master" ] && [ " $TRAVIS_PULL_REQUEST " == " false" ] && [ " $SQ_VERSION " == " LTS" ]; then
17
+ mvn -B sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
18
+ fi
19
+
7
20
cd its
8
21
mvn -B clean install -Dsonar.runtimeVersion=$SQ_VERSION
9
-
You can’t perform that action at this time.
0 commit comments