travis: Only build sonarcloud target if the token is available
authorTobias Brunner <tobias@strongswan.org>
Tue, 2 Oct 2018 07:38:00 +0000 (09:38 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 2 Oct 2018 07:38:00 +0000 (09:38 +0200)
That's not the case for pull requests that don't have access to
encrypted tokens/environment variables.

.travis.yml

index d39c9cb..e9be72d 100644 (file)
@@ -59,6 +59,7 @@ matrix:
       env: TEST=osx
     - compiler: gcc
       env: TEST=sonarcloud
+      if: env(SONAR_TOKEN) IS present
       git:
         depth: false
       addons: