SonarQube Version : 8.4.2
SonarQube Scanner version : 3.2.0.1227
Issue:
We are trying to scan the cobal files and upload them to SonarQube server and based on the analysis we are trying to invoke the quality check. Scan is successful and its uploaded to SonarQube server as well, how ever when we invoke waitForQualityGate function in our Jenkins pipeline we are getting 401 error.
What we tried so far:
Based on previous discussion in sonar community and on internet we have tried all the scenarios and our options are exhausted.
Scenarios tried so far:
- used credentials id in waitForQualityGate function
- hard coded the token in both withSonarQubeenv function and waitForQualityGate function
Observation:
It was mentioned in a blog that if we pass the user name and password for sonar analysis, this cred wont be accepted for waitForQualityGate, as this will only take token as the cred. Can you please clarify on this as well.
Please note that we are not facing any issue when performing the waitForQualityGate for maven, dotnet technology.