diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-10-16 21:19:43 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-10-16 21:19:43 +0200 |
commit | 908547bead1f995e94c2b219d86e4278915c3081 (patch) | |
tree | a77d2d50e140fe9b9fa24dbb8a8bcf78381c7f32 /travis.sh | |
parent | 1fdd3216cc4e072ac41693e4208a8bf6e1cdc4e9 (diff) | |
download | sonarqube-908547bead1f995e94c2b219d86e4278915c3081.tar.gz sonarqube-908547bead1f995e94c2b219d86e4278915c3081.zip |
Travis - support analysis of PR based on PR
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/travis.sh b/travis.sh index fb8ace1f6d3..7d80c1242bc 100755 --- a/travis.sh +++ b/travis.sh @@ -187,19 +187,15 @@ BUILD) -Dsonar.github.repository=$TRAVIS_REPO_SLUG \ -Dsonar.github.oauth=$GITHUB_TOKEN - if [ "$TRAVIS_BRANCH" == "master" ]; then - # analysis of short-living branch based on another short-living branch - # is currently not supported - 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 \ - -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \ - -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \ - -Dsonar.analysis.sha1=$TRAVIS_COMMIT \ - -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG - fi + 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 \ + -Dsonar.analysis.buildNumber=$TRAVIS_BUILD_NUMBER \ + -Dsonar.analysis.pipeline=$TRAVIS_BUILD_NUMBER \ + -Dsonar.analysis.sha1=$TRAVIS_COMMIT \ + -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG else echo 'Build feature branch or external pull request' |