瀏覽代碼

SONAR-13259 Fix branch analysis on Travis CI for public repo

tags/8.3.0.34182
Wouter Admiraal 4 年之前
父節點
當前提交
f0defbad20
共有 1 個檔案被更改,包括 14 行新增5 行删除
  1. 14
    5
      travis.sh

+ 14
- 5
travis.sh 查看文件

@@ -41,11 +41,20 @@ BUILD)
# the '-' at the end is needed when using set -u (the 'nounset' flag)
# see https://stackoverflow.com/a/9824943/641955
if [[ -n "${SONAR_TOKEN-}" ]]; then
./gradlew jacocoTestReport sonarqube --info --no-daemon --console plain \
-Dsonar.projectKey=org.sonarsource.sonarqube:sonarqube \
-Dsonar.organization=sonarsource \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login="$SONAR_TOKEN"
if [[ "${TRAVIS_BRANCH}" == "master" ]]; then
./gradlew jacocoTestReport sonarqube --info --no-daemon --console plain \
-Dsonar.projectKey=org.sonarsource.sonarqube:sonarqube \
-Dsonar.organization=sonarsource \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login="$SONAR_TOKEN"
else
./gradlew jacocoTestReport sonarqube --info --no-daemon --console plain \
-Dsonar.projectKey=org.sonarsource.sonarqube:sonarqube \
-Dsonar.organization=sonarsource \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.login="$SONAR_TOKEN" \
-Dsonar.branch.name="$TRAVIS_BRANCH"
fi
# Wait for 5mins, hopefully the report will be processed.
sleep 5m

Loading…
取消
儲存