Can you confirm that previous step: sonarcloud-scan is completing successfully? It looks like there is a problem with configuration, sonarcloud-quality-gate is failing due to an error, not due to the coverage being being too low.
It looks good to me. I suspect there is a problem with authorization. Can you remove the ‘variables’ from the pipe definition of sonarcloud-quality-gate so you have:
and add SONAR_TOKEN variable as the repository variable. You can do it in repository settings → repository variables. Please make sure you have the right token (generate the new one),
I will ask you try out one more thing. Can you remove the variables from the sonarcloud-scan pipe and check whether it works that way. This will confirm if token is correct. You should have sth like that:
Can you share your latest background task id that is connected with the failing pipe? You can find it in Administration → Backgroud tasks
Are you administrator of you organization? The token you provide for the quality-gate pipe must be generated by the user that has the permission “Execute analysis”.
Does it happen only for this repository? Do you have any other repos you could give a try?
As you are using SonarQube I changed the tag of the topic from SonarCloud to SonarQube. Unfortunately the sonarcloud-quality-gate pipe that you are using is only available for SonarCloud, that is why it does not work for you.