@David:
-
First it checks whether the quality gate check is already complete. It immediately returns if it has.
-
If not it then waits until sonar sends the webhook call to jenkins server. (hence why adding the sleep seems to work because sonar has already finished its analysis by that time)
-
If the webhook never fires (isn’t configured correctly/ or cannot communicate/plugin bug) from sonar to jenkins the call stays stuck and hung until the timeout is hit.