Skip to content

SonarQube GitLab Plugin Not Posting Scan Results as Comments #38

@JavayVeneno

Description

@JavayVeneno

Hello, after trying it out, my sonar-gitlab-plugin didn't post the scan results as comments in GitLab. Is there a command in GitLab CI for this?

This is my installation environment, the versions of SonarQube and the GitLab plugin, and the CI script:

SonarQube: 9.9.5
GitLab: 17.0
sonar-gitlab-plugin: 5.4.0
The CI script is roughly as follows:

mvn $MAVEN_CLI_OPTS verify sonar:sonar
-DskipTests
-Dsonar.host.url=${SONAR_HOST_URL}
-Dsonar.login=${SONAR_TOKEN}
-Dsonar.gitlab.commit_sha=${CI_COMMIT_SHA}
-Dsonar.gitlab.ref_name=${CI_COMMIT_REF_NAME}
-Dsonar.gitlab.project_id=${CI_PROJECT_PATH}
-Dsonar.gitlab.url=http://192.168.0.110:9000
-Dsonar.gitlab.api_version=v4
-Dsonar.gitlab.user_token=${GITLAB_USER_TOKEN}
-Dsonar.gitlab.merge_request_discussion=true
-Dsonar.gitlab.json_mode=CODECLIMATE
-Dsonar.gitlab.failure_notification_mode=commit-status
-Dmaven.compile.skip=true
-Dsonar.projectKey=784-idp_784-IDP_AZA5zwnUWJ1OnTNqRY69

echo "SonarQube analysis completed."

Awaiting Your Response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions