aboutsummaryrefslogtreecommitdiffstats
path: root/travis.sh
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-09-13 14:37:56 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-09-13 14:38:11 +0200
commit4c8bee5c2a6e733c28e34d200ed64eb5674318e7 (patch)
treedc7fdb386623a1f57d5b60d513e8132c8b1df98f /travis.sh
parent05c479bafd88810399d82d88859d040b035a7d86 (diff)
downloadsonarqube-4c8bee5c2a6e733c28e34d200ed64eb5674318e7.tar.gz
sonarqube-4c8bee5c2a6e733c28e34d200ed64eb5674318e7.zip
Disable analysis of PR based on another PR
This is currently not supported by the branch plugin.
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/travis.sh b/travis.sh
index 0a6f4fc9136..c23854d051a 100755
--- a/travis.sh
+++ b/travis.sh
@@ -160,13 +160,7 @@ BUILD)
-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
+ # analysis to decorate GitHub pull request
# (need support of standard analysis mode in GH plugin)
mvn sonar:sonar \
-Dsonar.host.url=$SONAR_HOST_URL \
@@ -176,6 +170,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
+ fi
else
echo 'Build feature branch or external pull request'