aboutsummaryrefslogtreecommitdiffstats
path: root/travis.sh
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-01-20 14:17:01 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-01-20 14:40:00 +0100
commit626f44e72a2a5954bcb3a2c05843ad8b9a933e90 (patch)
treeb5d88b2757433776f613a506e1e69829f4b5b496 /travis.sh
parent58c103e50993dc3bc06b1190da827f32826aa623 (diff)
downloadsonarqube-626f44e72a2a5954bcb3a2c05843ad8b9a933e90.tar.gz
sonarqube-626f44e72a2a5954bcb3a2c05843ad8b9a933e90.zip
Disable analysis of external PRs
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/travis.sh b/travis.sh
index 88715b8ae10..045a2adef2a 100755
--- a/travis.sh
+++ b/travis.sh
@@ -16,11 +16,10 @@ function strongEcho {
case "$TARGET" in
CI)
- if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ -n "$GITHUB_TOKEN" ]; then
+ if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]; then
# For security reasons environment variables are not available on the pull requests
# coming from outside repositories
# http://docs.travis-ci.com/user/pull-requests/#Security-Restrictions-when-testing-Pull-Requests
- # That's why the analysis does not need to be executed if the variable GITHUB_TOKEN is not defined.
strongEcho 'Build and analyze pull request'
# this pull request must be built and analyzed (without upload of report)