Set Sonar branch name to 'develop' in CI pipeline

Added the Sonar branch name parameter to ensure proper tracking of the 'develop' branch during analysis. This change enhances consistency and accuracy in SonarQube reporting for this branch.
This commit is contained in:
2025-04-15 19:13:28 +02:00
parent fe2f9c512f
commit f7035fad01
+3 -3
View File
@@ -8,11 +8,11 @@ stages:
- sonarcloud_scan - sonarcloud_scan
variables: variables:
GITLAB_CLONE_DIR: "/builds/thischwa/CloudflareDNS-java" GITLAB_CLONE_DIR: "/builds/ths6435116/CloudflareDNS-java"
# GITLAB_CLONE_DIR: "cloudflaredns-java" # GITLAB_CLONE_DIR: "cloudflaredns-java"
SONAR_HOST_URL: $SONAR_HOST_URL SONAR_HOST_URL: $SONAR_HOST_URL
SONAR_PROJECT_KEY: "thischwa_CloudflareDNS-java" SONAR_PROJECT_KEY: "ths6435116_CloudflareDNS-java"
SONAR_ORGANIZATION: "thischwa" SONAR_ORGANIZATION: "ths6435116"
SONAR_TOKEN: $SONAR_TOKEN # Ensure this token is correctly set in GitLab CI/CD variables SONAR_TOKEN: $SONAR_TOKEN # Ensure this token is correctly set in GitLab CI/CD variables
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task