Commit 3736723b authored by Sébastien Dinot's avatar Sébastien Dinot Committed by Luc Maisonobe

Add SonarQube related properties

'sonar.projectKey' and 'sonar.projectName' properties were not set on
the Maven command line. Because of their default values, they had the
same value for all Orekit forks. All analysis reports were therefore
pushed in the same SonarQube project, which was not appropriate. This
modification will improve the CI behavior by setting a specific value
for these proprerties for each fork.
parent 7c1bd047
......@@ -19,12 +19,18 @@ variables:
# when running from the command line.
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
MAVEN_CLI_OPTS: "-s .CI/maven-settings.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
SONAR_PROJECT_KEY: "${CI_PROJECT_NAMESPACE}:${CI_PROJECT_NAME}"
SONAR_PROJECT_NAME: "${CI_PROJECT_TITLE} (${CI_PROJECT_NAMESPACE}:${CI_PROJECT_NAME})"
verify:
stage: verify
script:
- mvn $MAVEN_CLI_OPTS verify site
- mvn $MAVEN_CLI_OPTS sonar:sonar -Dsonar.login=${SONAR_TOKEN} -Dsonar.branch.name=${CI_COMMIT_REF_NAME}
- mvn $MAVEN_CLI_OPTS sonar:sonar
-Dsonar.login=${SONAR_TOKEN}
-Dsonar.branch.name=${CI_COMMIT_REF_NAME}
-Dsonar.projectKey="$SONAR_PROJECT_KEY"
-Dsonar.projectName="$SONAR_PROJECT_NAME"
artifacts:
paths:
- target/*.jar
......@@ -65,7 +71,7 @@ deploy:site:
##
- echo "$SSH_SECRET_KEY" > ~/.ssh/id_website
- chmod 700 ~/.ssh/id_website
##
## Add known hosts
##
......
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