travis: Read project/organization for SonarCloud from environment variable
This commit is contained in:
parent
76425800c4
commit
fd5cf31108
|
@ -39,15 +39,17 @@ env:
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- env: TEST=sonarcloud
|
- env: TEST=sonarcloud
|
||||||
if: type = push AND env(SONAR_TOKEN) IS present
|
if: |
|
||||||
|
type = push AND env(SONAR_TOKEN) IS present AND \
|
||||||
|
env(SONAR_PROJECT) IS present AND \
|
||||||
|
env(SONAR_ORGANIZATION) IS present
|
||||||
git:
|
git:
|
||||||
depth: false
|
depth: false
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.sonar-cache
|
- $HOME/.sonar-cache
|
||||||
addons:
|
addons:
|
||||||
sonarcloud:
|
sonarcloud: true
|
||||||
organization: "strongswan"
|
|
||||||
- env: TEST=lgtm
|
- env: TEST=lgtm
|
||||||
if: type = push AND env(LGTM_TOKEN) IS present
|
if: type = push AND env(LGTM_TOKEN) IS present
|
||||||
git:
|
git:
|
||||||
|
|
|
@ -448,7 +448,8 @@ apidoc)
|
||||||
;;
|
;;
|
||||||
sonarcloud)
|
sonarcloud)
|
||||||
sonar-scanner \
|
sonar-scanner \
|
||||||
-Dsonar.projectKey=strongswan \
|
-Dsonar.projectKey=${SONAR_PROJECT} \
|
||||||
|
-Dsonar.organization=${SONAR_ORGANIZATION} \
|
||||||
-Dsonar.projectVersion=$(git describe)+${TRAVIS_BUILD_NUMBER} \
|
-Dsonar.projectVersion=$(git describe)+${TRAVIS_BUILD_NUMBER} \
|
||||||
-Dsonar.sources=. \
|
-Dsonar.sources=. \
|
||||||
-Dsonar.cfamily.threads=2 \
|
-Dsonar.cfamily.threads=2 \
|
||||||
|
|
Loading…
Reference in New Issue