Skip to content

CI: use sonarqube-scan-action instead of sonar-scanner #1060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2025

Conversation

mgovers
Copy link
Member

@mgovers mgovers commented Aug 4, 2025

No description provided.

Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
@mgovers mgovers self-assigned this Aug 4, 2025
@mgovers mgovers added the dependencies Pull requests that update a dependency file label Aug 4, 2025
@mgovers mgovers requested a review from Copilot August 4, 2025 10:34
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the SonarQube integration in the CI workflow by replacing the deprecated sonar-scanner CLI tool with the official SonarSource GitHub Actions. The changes streamline the setup process and align with current best practices for SonarQube integration in GitHub workflows.

Key changes:

  • Replace SonarSource/sonarcloud-github-c-cpp@v3 with SonarSource/sonarqube-scan-action/install-build-wrapper@v5 for build wrapper installation
  • Replace manual sonar-scanner CLI execution with SonarSource/sonarqube-scan-action@v5 action
  • Update step names to reflect the new tooling approach
Comments suppressed due to low confidence (2)

.github/workflows/sonar.yml:50

  • The action SonarSource/sonarqube-scan-action/install-build-wrapper@v5 does not exist. The correct action for installing the build wrapper is SonarSource/sonarcloud-github-c-cpp@v3 or you should use the main SonarSource/sonarqube-scan-action@v5 action which includes build wrapper functionality.
        uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v5

.github/workflows/sonar.yml:79

  • The version @v5 of SonarSource/sonarqube-scan-action does not exist. The latest available version is @v3. Please use SonarSource/sonarqube-scan-action@v3 instead.
        uses: SonarSource/sonarqube-scan-action@v5

Copy link

sonarqubecloud bot commented Aug 4, 2025

@figueroa1395
Copy link
Contributor

@mgovers Was this triggered by the failed Sonar cloud in #1059?

@mgovers
Copy link
Member Author

mgovers commented Aug 4, 2025

@mgovers Was this triggered by the failed Sonar cloud in #1059?

yes. it's also failing on main and they basically will remove it sometime in the near future. (see e.g. https://github.com/PowerGridModel/power-grid-model/actions/runs/16716376838/job/47317472386?pr=1057#step:7:30)

Run SonarSource/sonarcloud-github-c-cpp@v3
Run echo "::warning title=SonarScanner::This action is deprecated and will be removed in a future release. Please use the sonarqube-scan-action and its install-build-wrapper sub-action instead."
Warning: This action is deprecated and will be removed in a future release. Please use the sonarqube-scan-action and its install-build-wrapper sub-action instead.

I think they just did a backwards incompatible change and only updated the new action and forgot about the deprecated one. This is probably a good time to migrate

@mgovers mgovers marked this pull request as ready for review August 4, 2025 11:00
@mgovers mgovers requested a review from figueroa1395 August 4, 2025 11:01
@mgovers mgovers enabled auto-merge August 4, 2025 11:01
@mgovers mgovers added this pull request to the merge queue Aug 4, 2025
Merged via the queue into main with commit a70feb0 Aug 4, 2025
32 checks passed
@mgovers mgovers deleted the feature/fix-sonar branch August 4, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants