aboutsummaryrefslogtreecommitdiffstats
path: root/travis.sh
diff options
context:
space:
mode:
authorPhilippe Perrin <philippe.perrin@sonarsource.com>2022-02-04 17:49:07 +0100
committersonartech <sonartech@sonarsource.com>2022-02-07 20:02:53 +0000
commitd0c2577e9290da2bd4d2ab98f96e5d374a548bff (patch)
treee6e3582d0c382d5accd7db0207d7e6f157fe3714 /travis.sh
parentea660b1b652e86820c693f9f5a1db75d1a05a078 (diff)
downloadsonarqube-d0c2577e9290da2bd4d2ab98f96e5d374a548bff.tar.gz
sonarqube-d0c2577e9290da2bd4d2ab98f96e5d374a548bff.zip
[NO-JIRA] Generate and consume frontend code coverage reports
Diffstat (limited to 'travis.sh')
-rwxr-xr-xtravis.sh62
1 files changed, 23 insertions, 39 deletions
diff --git a/travis.sh b/travis.sh
index bd101964e3f..676ee886aa6 100755
--- a/travis.sh
+++ b/travis.sh
@@ -32,44 +32,28 @@ keep_alive &
# @TravisCI please provide the feature natively, like at AppVeyor or CircleCI ;-)
cancel_branch_build_with_pr || if [[ $? -eq 1 ]]; then exit 0; fi
-case "$TARGET" in
-
-BUILD)
- git fetch --unshallow
- ./gradlew build --no-daemon --console plain
-
- # 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
- 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
- ./.travis/run_iris.sh
+git fetch --unshallow
+./gradlew build --no-daemon --console plain
+
+# 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
+ if [[ "${TRAVIS_BRANCH}" == "master" ]]; then
+ ./gradlew jacocoTestReport :server:sonar-web:yarn_validate-ci 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 :server:sonar-web:yarn_validate-ci 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
- ;;
-
-WEB_TESTS)
- ./gradlew :server:sonar-web:yarn_validate-ci --no-daemon --console plain
- ;;
-*)
- echo "Unexpected TARGET value: $TARGET"
- exit 1
- ;;
-
-esac
-
+ # Wait for 5mins, hopefully the report will be processed.
+ sleep 5m
+ ./.travis/run_iris.sh
+fi \ No newline at end of file