]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Disable build of branch on Travis if a PR is open
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 15 Mar 2019 13:38:43 +0000 (14:38 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 15 Mar 2019 20:19:59 +0000 (21:19 +0100)
travis.sh

index c61c5eef74d2c5a54d82714de1e5b68f1aff8367..c468541d824b7b679f228976a99a6a645598b411 100755 (executable)
--- a/travis.sh
+++ b/travis.sh
@@ -11,5 +11,11 @@ configureTravis
 
 export DEPLOY_PULL_REQUEST=true
 
+# When a pull request is open on the branch, then the job related
+# to the branch does not need to be executed and should be canceled.
+# It does not book slaves for nothing.
+# @TravisCI please provide the feature natively, like at AppVeyor or CircleCI ;-)
+cancel_branch_build_with_pr || exit 0
+
 regular_mvn_build_deploy_analyze -Pdist-linux,dist-windows,dist-macosx