Page MenuHomePhabricator

SonarQube: generate project key
Closed, ResolvedPublic

Description

SonarQube is a GitLab CI/CD template used to continuously inspect GitLab projects with minimal setup.
Currently, there are two variables that must be explicitly set in the project's environment variables: SONAR_PROJECT_KEY and SONAR_TOKEN.
Just as we do in Gerrit, we should auto-generate SONAR_PROJECT_KEY from the project name if the variable is not explicitly set. This will reduce the variables that
need to be set to one.

AC:

  • SonarQube generates the project key from the project name. For example, if the project name in GitLab is gobblin-wmf or gobblin wmf, the generated project key should be wmftest_gobblin-wmf.

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Auto generate SONAR_PROJECT_KEY if it has not been explicitly set in the environment variablesrepos/test-platform/sonarqube!2pwangaiT402982main
Customize query in GitLab