From 908547bead1f995e94c2b219d86e4278915c3081 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 16 Oct 2017 21:19:43 +0200 Subject: [PATCH] Travis - support analysis of PR based on PR --- travis.sh | 22 +++++++++------------- 1 file 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' -- 2.39.5