This is a race condition report.
The google groups linked below outline that many other have found this issue.
However after my team troubleshot the issue we’re pretty sure that it isn’t clear that the plugin just needs a bit of login to fail/retry a few times over 5 seconds or so. We proved that the https is correct so that was a red herring related to misconfiguration which may have prevented this from being a bug in the past.
versions used (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube Jenkins Plugin: 2.7.1
SonarQube: Version 7.0 (build 36138)
Jenkins: Jenkins ver. 2.107.2
None; the plugin hangs if the REST URL isn’t ready on the first try.
As obvserved here: https://groups.google.com/forum/#!topic/sonarqube/nJEyTuadwFI
I also found this from David Karr: Scan using branch plugin and webhook fails to get quality gate and doesn’t report back to stash
steps to reproduce
It’s a performance race condition. Cannot reliably be replicated except in situ. But the simple solution is just to ensure that a retry is attempted after a timeout.
Sleep 5 in the Jenkins groovy script is essentially always successful. It seems that just waiting five seconds allows the REST URL to finish getting available.