Skip to content

ci: add IBM SonarQube scan - #2663

Open
erichare wants to merge 2 commits into
mainfrom
ci/ibm-sonarqube
Open

erichare wants to merge 2 commits into
mainfrom
ci/ibm-sonarqube

Conversation

@erichare

@erichare erichare commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Adds an IBM SonarQube Scan workflow that runs the unit tests, then the SonarScanner for Maven, using the existing IBM_SONARQUBE_* org secrets. Pushes to main get a branch analysis. Pull requests against main get a PR analysis that waits on the quality gate. Fork PRs are skipped because they get no secrets. Analysis scope lives in sonar.* properties in pom.xml, since the Maven scanner ignores sonar-project.properties. Coverage is unit tests only. The truststore password secret has trailing whitespace, so the workflow trims it.

Which issue(s) this PR fixes:

Fixes #2664

Verification

A scan against a local SonarQube container indexed 820 main files, imported unit coverage at 52.3%, and passed the default gate. The full unit suite passed with 3616 tests and no failures. actionlint is clean.

SONAR_HOST_URL=http://localhost:9000 SONAR_TOKEN=<local token> ./mvnw -B -ntp org.sonarsource.scanner.maven:sonar-maven-plugin:5.8.0.7211:sonar

The IBM server itself is only tested by this PR's run. Open questions: does project 544478-564388942 need to exist on the server first, and should this check be required on main?

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

Run the SonarScanner for Maven on pushes to main and on pull requests
against main, using the IBM SonarQube org secrets. Analysis scope lives
in sonar.* properties in pom.xml. Coverage comes from the unit test
JaCoCo report.
@erichare
erichare requested a review from a team as a code owner October 27, 2026 19:09
@github-actions

Copy link
Copy Markdown
Contributor

➡️ Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 55.07%
This PR 55.07%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 55.07% 🍏

There is no coverage information present for the Files changed

The IBM_SONARQUBE_CERT_PASSWORD org secret ends in whitespace. Passed
through quoted, it made the scanner reject the truststore with "PKCS12
key store mac invalid". Strip leading and trailing whitespace first.
@sonarqube-dx-prod

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube

@github-actions

Copy link
Copy Markdown
Contributor

➡️ Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 73.04%
This PR 73.04%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 73.04% 🍏

There is no coverage information present for the Files changed

@github-actions

Copy link
Copy Markdown
Contributor

➡️ Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 74.35%
This PR 74.35%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 74.35% 🍏

There is no coverage information present for the Files changed

@erichare erichare mentioned this pull request Oct 27, 2026
4 tasks done

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add IBM SonarQube scanning to CI

1 participant