You are welcome!
You are right, but here is how to solve this problem:
- Connect to our SonarQube instance using your Gitlab account.
- The first time you log in, SonarQube will prompt you to generate a token. Generate it and keep it safe on your workstation. If you did not do so the first time you logged in, you can do so later by going to your account settings on SonarQube: My account → Security → Generate Tokens
- Then connect to Gitlab.
- Go to the continuous integration (CI) configuration page of your fork (Settings → CI/CD → Variables → Expand) and declare a variable named
SONAR_TOKEN
. The value of this variable must be the value of the token provided by SonarQube. Check the “Mask variable” option and click on “Add variable”. - SonarQube dynamically initiates the project on the first submission, but the first submission must be on the
master
branch. You can cause this by manually triggering a pipeline:- Once Orekit version 11 has been released (and its code pushed to master), all you will have to do will be follow this path: Project home page → CI/CD → Pipelines → Run pipeline → Select
master
branch → Run pipeline → Wait half an hour - While waiting for the release of Orekit version 11, you need to perform one more step, just before launching the pipeline: You have to override (in the web interface of Gitlab) the definition of the
MAVEN_CLI_OPTS
variable (defined in the CI script). Just before clicking on the final “Run pipeline”, state thatMAVEN_CLI_OPTS
variable value is:
In fact, this is the default value of the-s .CI/maven-settings.xml --batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true -Dsonar.projectKey="Anne-Laure/orekit" -Dsonar.projectName="Orekit (Anne-Laure/orekit)"
MAVEN_CLI_OPTS
variable, increased by the following parameters:
Then, run the pipeline and wait half an hour.-Dsonar.projectKey="Anne-Laure/orekit" -Dsonar.projectName="Orekit (Anne-Laure/orekit)"
- Once Orekit version 11 has been released (and its code pushed to master), all you will have to do will be follow this path: Project home page → CI/CD → Pipelines → Run pipeline → Select
- After that, you can run again the pipeline on your working branch. But if your working branch was created from
master
orrelease-10.3
branches, you have to override theMAVEN_CLI_OPTS
variable as on themaster
branch.
Sébastien