I have some Sonar scans that are lacking the report-task.txt file. Looks like this is the case when I do a scan in preview mode to Sonar 6.7.x. but also for some scans (maybe only PRs?) on Sonar 7.9.x.
In which cases is the report-task.txt created an in which not?
which versions are you using
SonarQube: EE 7.9.5 (build 38598), CE 6.7.7 (build 38951)
Scanner: 4.5
what are you trying to achieve
I would like to fetch some measurements from the API and want to make sure I really get the results from my latest scan. Therefore I use the report-task.txt file created by the scanner to get the taskID and check the /ce/task api if the task has finished yet.
If the scan completes (considering the background task separately), it should create the report-task.txt file. I suppose if it failed to connect to your sonarqube instance, it might fail to create it, but that’s usually a moot situation.
I do completely understand the need to find this file and use it. We’re using SonarQube 7.9.2. In our network, the webhook to Jenkins no longer works (almost a year now), and we’ve never been able to figure out why (gets “Server unreachable” on every attempt). As a result of this, I implemented script code to poll the taskid pulled from the report-task.txt file, until the task is complete.
For some scans on PRs but also main branches. Execution succeeds for all scans but file is not present. I had hoped you could tell me in which cases none is created.