diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-09-13 13:45:35 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-09-13 13:45:35 +0200 |
commit | 736e89cc1629e1e52db00f67e4650f1b88695de9 (patch) | |
tree | ceceb6a33c3a3370e31936dc18fc54c2263d49c2 /travis.sh | |
parent | ae8c438f8d48be4d98bbd703a6784d250c73f524 (diff) | |
download | sonarqube-736e89cc1629e1e52db00f67e4650f1b88695de9.tar.gz sonarqube-736e89cc1629e1e52db00f67e4650f1b88695de9.zip |
Analyze pull requests as short-living branches on next.sonarqube.com
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/travis.sh b/travis.sh index 770d50a65bb..0a6f4fc9136 100755 --- a/travis.sh +++ b/travis.sh @@ -159,13 +159,22 @@ BUILD) $MAVEN_ARGS \ -Dsource.skip=true \ -Pdeploy-sonarsource + + mvn sonar:sonar \ + -Dsonar.host.url=$SONAR_HOST_URL \ + -Dsonar.login=$SONAR_TOKEN \ + -Dsonar.branch.name=$TRAVIS_PULL_REQUEST_BRANCH \ + -Dsonar.branch.target=$TRAVIS_BRANCH + + # second analysis to decorate GitHub pull request + # (need support of standard analysis mode in GH plugin) mvn sonar:sonar \ + -Dsonar.host.url=$SONAR_HOST_URL \ + -Dsonar.login=$SONAR_TOKEN \ -Dsonar.analysis.mode=preview \ -Dsonar.github.pullRequest=$TRAVIS_PULL_REQUEST \ -Dsonar.github.repository=$TRAVIS_REPO_SLUG \ - -Dsonar.github.oauth=$GITHUB_TOKEN \ - -Dsonar.host.url=$SONAR_HOST_URL \ - -Dsonar.login=$SONAR_TOKEN + -Dsonar.github.oauth=$GITHUB_TOKEN else echo 'Build feature branch or external pull request' |