fix(ci): fix sonar-pr-analysis for fork PRs#806
Merged
Conversation
|
Please check on sonarcloud https://sonarcloud.io/project/pull_requests_list?id=io.github.mivek%3AmetarParser that the PR does not add any issue. |
988c8a8 to
8d9c5ec
Compare
… path - generate-docs job now only runs on push to main, not on PRs. Its failure would set workflow conclusion to 'failure' and prevent the sonar-pr-analysis workflow_run trigger from firing. - Remove dead artifact upload path '**/target/jacoco.xml'; JaCoCo report goal writes to target/site/jacoco/jacoco.xml which is already covered by the '**/target/site/jacoco/**' glob.
|
🎉 This PR is included in version 2.26.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The
sonar-pr-analysisworkflow failed with:The original step order in
sonar-pr-analysis.ymlwas:clean: truewiped the class files!actions/checkoutwith defaultclean: truedeletes all untracked files, which destroyed the downloaded.classfiles before Sonar could analyse them.Fixes
sonar-pr-analysis.yml(committed in previous push)actions: readpermission (required for cross-run artifact download)maven-verify.ymlgenerate-docswithif: github.event_name == 'push': its failure on a PR would set the workflow conclusion tofailure, silently suppressing the Sonarworkflow_runtrigger**/target/jacoco.xml(JaCoCo writes totarget/site/jacoco/jacoco.xml, already covered by the existing glob)