Skip to content

BUILD-8830 disable sonar scans for build-gradle option#96

Merged
mikolaj-matuszny-ext-sonarsource merged 1 commit intomasterfrom
feat/mmatuszny/BUILD-8830-disable-sonar-gradle
Sep 18, 2025
Merged

BUILD-8830 disable sonar scans for build-gradle option#96
mikolaj-matuszny-ext-sonarsource merged 1 commit intomasterfrom
feat/mmatuszny/BUILD-8830-disable-sonar-gradle

Conversation

@mikolaj-matuszny-ext-sonarsource
Copy link
Copy Markdown
Contributor

@mikolaj-matuszny-ext-sonarsource mikolaj-matuszny-ext-sonarsource commented Sep 18, 2025

@mikolaj-matuszny-ext-sonarsource mikolaj-matuszny-ext-sonarsource force-pushed the feat/mmatuszny/BUILD-8830-disable-sonar-gradle branch from 14734d8 to cf0e11c Compare September 18, 2025 09:05
@mikolaj-matuszny-ext-sonarsource mikolaj-matuszny-ext-sonarsource force-pushed the feat/mmatuszny/BUILD-8830-disable-sonar-gradle branch from cf0e11c to 1083c0e Compare September 18, 2025 09:51
@sonarqubecloud
Copy link
Copy Markdown

🤖 Pull Request summary

Updates Gradle build action to support skipping SonarQube analysis.

• Added 'none' option to sonar-platform parameter to disable SonarQube scans entirely
• Modified environment validation to skip SonarQube credentials when platform is 'none'
• Refactored git fetch logic to skip unshallow fetch when Sonar analysis is disabled
• Updated gradle_build() to bypass orchestrator and call build directly for 'none' platform
• Added comprehensive test coverage for the new skip-sonar functionality

Review focus: Verify the conditional logic properly handles all code paths when sonar-platform='none', especially around environment validation and the orchestrator bypass.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@mikolaj-matuszny-ext-sonarsource
Copy link
Copy Markdown
Contributor Author

@mikolaj-matuszny-ext-sonarsource mikolaj-matuszny-ext-sonarsource merged commit d0cd411 into master Sep 18, 2025
12 checks passed
@mikolaj-matuszny-ext-sonarsource mikolaj-matuszny-ext-sonarsource deleted the feat/mmatuszny/BUILD-8830-disable-sonar-gradle branch September 18, 2025 12:29
Comment thread build-gradle/action.yml
default: ''
sonar-platform:
description: SonarQube variant (next, sqc-eu, or sqc-us)
description: SonarQube variant (next, sqc-eu, sqc-us, or none). Use 'none' to skip sonar scans.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

@mikolaj-matuszny-ext-sonarsource mikolaj-matuszny-ext-sonarsource Sep 19, 2025

Choose a reason for hiding this comment

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

This is a general action and on: workflow_dispatch is how you execute it.
In your project you can define such input options which you can select when manually triggering the workflow. Then you can pass this input to you action call.
It's not an option in action definition which is what's we're creating here.

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.

3 participants