aboutsummaryrefslogtreecommitdiffstats
path: root/travis.sh
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-10-16 21:19:43 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-10-16 21:19:43 +0200
commit908547bead1f995e94c2b219d86e4278915c3081 (patch)
treea77d2d50e140fe9b9fa24dbb8a8bcf78381c7f32 /travis.sh
parent1fdd3216cc4e072ac41693e4208a8bf6e1cdc4e9 (diff)
downloadsonarqube-908547bead1f995e94c2b219d86e4278915c3081.tar.gz
sonarqube-908547bead1f995e94c2b219d86e4278915c3081.zip
Travis - support analysis of PR based on PR
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh22
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'