Skip to content

Commit 8a1f500

Browse files
committed
Add Sonarqube analysis to the build
Runs a Sonarqube analysis on every build of the master branch and publishes the results to https://sonarcloud.io/dashboard?id=org.metafacture%3Ametafacture-core
1 parent b909177 commit 8a1f500

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,21 @@ dist: trusty
33
language: java
44
jdk:
55
- oraclejdk8
6+
addons:
7+
sonarcloud:
8+
organization: metafacture
9+
token: $SONARCLOUD_TOKEN
10+
cache:
11+
directories:
12+
- $HOME/.sonar/cache
613

714
before_install:
815
- ./travis/switch-to-branch.sh
916

17+
script:
18+
- ./gradlew check
19+
- ./gradlew sonarqube
20+
1021
after_success:
1122
- ./travis/publish.sh
1223

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import java.util.regex.Matcher
1818

1919
plugins {
2020
id 'org.ajoberstar.grgit' version '2.0.1'
21+
id "org.sonarqube" version "2.5"
2122
}
2223

2324
ext.scmInfo = getScmInfo()

0 commit comments

Comments
 (0)