fix: provision GitLab CI variables for SonarQube - #2539
Merged
Conversation
shikanime
force-pushed
the
fix/sonarqube-gitlab-ci-vars
branch
5 times, most recently
from
August 20, 2026 17:15
1d1d874 to
2e03dbb
Compare
shikanime
marked this pull request as ready for review
August 20, 2026 17:19
Contributor
|
🤖 Hey ! A preview of the application is available at : https://console-pr-2539.dso.cpin-hp.numerique-interieur.fr Please be patient, deployment may take a few minutes. |
shikanime
force-pushed
the
fix/sonarqube-gitlab-ci-vars
branch
3 times, most recently
from
August 21, 2026 09:28
cb19b5e to
7a1f2c1
Compare
Expose the SonarQube robot SONAR_TOKEN once per project at the GitLab group level so CI pipelines can reach quality gate data. Adds the isGitbeakerNotFound/setGitlabGroupVariable helpers the wiring needs and drops a dangling optional-chain in the variable upsert guard. Co-authored-by: Automata <automata@shikanime.studio> Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: I9a7c9e98093c89db7fccd61e63f4ee9c6a6a6964
shikanime
force-pushed
the
fix/sonarqube-gitlab-ci-vars
branch
from
August 21, 2026 12:30
7a1f2c1 to
d25b4d0
Compare
|
KepoParis
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

0 New Issues
0 Fixed Issues
0 Accepted Issues
Issues liées
Closes #2538
Quel est le comportement actuel ?
Le module
sonarqubedeapps/server-nestjscréait le projet SonarQube, posait les permissions et écrivait le secret Vault (SONAR_USERNAME/SONAR_PASSWORD/SONAR_TOKEN), mais n'approvisionnait aucune variable CI GitLab — contrairement au plugin legacyplugins/sonarqubequi exécutaitsetVariables(PROJET_KEY=…, PROJECT_NAME=…, SONAR_TOKEN, SONAR_PROJECT_PROPERTIES). Les pipelines GitLab ne disposaient donc pas des variables nécessaires à l'analyse SonarQube.Quel est le nouveau comportement ?
GitlabClientServiceexpose deux méthodes idempotentes (setGitlabGroupVariable,setGitlabRepoVariable) qui créent/mettent à jour/laissent intacte une variable CI selon son état courant.SonarqubeService.ensureProjectRepositoriesprovisionne désormais, pour chaque dépôt :PROJECT_KEY,PROJECT_NAME,SONAR_PROJECT_PROPERTIES(type fichier), etSONAR_TOKEN(masqué) ;SONAR_TOKENest également posé au niveau du groupe projet (partagé entre dépôts). Valeurs calquées sur lesonar-project.propertiesdu plugin legacy.Cette PR introduit-elle un breaking change ?
Non.
Autres informations
Tests unitaires ajoutés sur les deux nouvelles méthodes (création / mise à jour / already up-to-date).