Commit e097e0a5 authored by Guilhem Bonnefille's avatar Guilhem Bonnefille
Browse files

Avoid breaking pipeline for unconfigured SonarQube

As quality should be checked, a failing stage is introduced to keep
integrator aware.
parent c5a3c27b
Pipeline #1247 canceled with stages
in 7 minutes and 8 seconds
......@@ -27,7 +27,7 @@ verify:
stage: verify
script:
- mvn $MAVEN_CLI_OPTS verify site
- mvn $MAVEN_CLI_OPTS sonar:sonar
- test -n "$SONAR_TOKEN" -a -n "$SONAR_PROJECT_KEY" -a "$SONAR_PROJECT_NAME" && mvn $MAVEN_CLI_OPTS sonar:sonar
-Dsonar.login=${SONAR_TOKEN}
-Dsonar.branch.name=${CI_COMMIT_REF_NAME}
-Dsonar.projectKey="$SONAR_PROJECT_KEY"
......@@ -40,6 +40,17 @@ verify:
junit:
- target/surefire-reports/*.xml
verify:warning:
stage: verify
script:
- echo "Please, configure SonarQube!"
- exit 1
allow_failure: true
rules:
- if: $SONAR_TOKEN == null
- if: $SONAR_PROJECT_KEY == null
- if: $SONAR_PROJECT_NAME == null
# Convert and import in GitLab coverage data.
# The information is then available directly in merge-request view.
# Cf. https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualization.html
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment