fix: composite the sonarcloud analysis (DCD-5103) - #421
Conversation
|
🤖 Hi @LukasKuzavas, I've received your request, and I'm working on it now! You can track my progress in the logs for more details. |
There was a problem hiding this comment.
📋 Review Summary
This Pull Request refactors SonarCloud analysis by replacing the reusable workflow .github/workflows/sonarcloud.yml with a composite action sonarcloud/action.yaml. The analysis is now executed as a step directly within the build-server job, which simplifies the pipeline, eliminates the need to upload and download large build artifacts, and ensures consistent coverage reports.
🔍 General Feedback
- Significant Efficiency Gains: Moving the SonarCloud analysis inline with the build job is a massive improvement. It avoids the overhead of uploading and downloading large classes and report artifacts, leading to faster CI runtimes and cleaner workspace state reuse.
- Potential Breaking Change for External Caller Repos: Since
.github/workflows/sonarcloud.ymlhas been completely deleted, any other repositories in the organization that reference this file as a reusable workflow (viauses: genesislcap/appdev-workflows/.github/workflows/sonarcloud.yml@...) will fail. Please double-check if any external repositories rely on this workflow and coordinate their migration to the new composite actiongenesislcap/appdev-workflows/sonarcloud@develop.
| arguments: >- | ||
| sonar --no-configuration-cache | ||
| ${{ inputs.gradle-arguments }} | ||
| -Dsonar.gradle.skipCompile=true | ||
| -Dsonar.token=${{ inputs.sonar-token }} |
There was a problem hiding this comment.
🟡 Passing the Sonar token via the -Dsonar.token command line option is redundant because the SONAR_TOKEN environment variable is already provided in the environment (on line 52). Removing it avoids passing sensitive tokens as command-line arguments, which can be visible in process listings or system logs.
| arguments: >- | |
| sonar --no-configuration-cache | |
| ${{ inputs.gradle-arguments }} | |
| -Dsonar.gradle.skipCompile=true | |
| -Dsonar.token=${{ inputs.sonar-token }} | |
| arguments: >- | |
| sonar --no-configuration-cache | |
| ${{ inputs.gradle-arguments }} | |
| -Dsonar.gradle.skipCompile=true |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
https://genesisglobal.atlassian.net/browse/DCD-5103
composite the sonarcloud analysis, to lessen complexity, to fix coverage analysis