The Analysis runs successfully and results in successfully uploaded report:
23:15:38 INFO: ANALYSIS SUCCESSFUL, you can browse SonarCloud 23:15:38 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report 23:15:38 INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AWoAvNvJ8FPh9JKrfqhN 23:15:38 INFO: Analysis total time: 13.791 s 23:15:38 INFO: ------------------------------------------------------------------------ 23:15:38 INFO: EXECUTION SUCCESS 23:15:38 INFO: ------------------------------------------------------------------------ 23:15:38 INFO: Total time: 16.883s 23:15:38 INFO: Final Memory: 42M/955M 23:15:38 INFO: --------------------------
However, the PR Check is not created.
I am new to SonarCloud and I suspect I have provided incorrect/incomplete configuration for the Analysis job.
Could someone please take a look to help me out with this?
Please check if the sha1 of the analysis matches the HEAD of the PR. This will not be the case for example if your build pipeline does a merge commit first before running SonarCloud analysis. In that case the sha1 will be different from the HEAD of the PR. And in that case decoration is skipped, because it wouldn’t be visible anyway, being a temporary local commit.
Also, when you open your PR on SonarCloud, do you see a warning in the top-right part of the UI? (a box with yellow background)
Hello Janos, thank you for prompt reply.
My pipeline does not make any commits on the projects. Just in case, where do I find the sha1 of the analysis?
It was indeed HEAD of the PR mismatch. While the pipeline itself does not do anything special with git checkout, the Jenkins job configuration did, by applying strategy: Both the current pull request revision and the pull request merged with the current target branch revision which resulted in new sha1 which did not exist on the remote side.
Switching to The current pull request revision strategy fixed the issue and SonarCloud Analysis PR check is set as expected.