Jenkins Pipeline - waitForQualityGate - Work only when force user authentication disabled


I have a intregation Sonarqube - Jenkins. Did a jenkins pipeline that get of status quality gates

 stage("Quality Gate") {
        timeout(time: 5, unit: 'MINUTES') { 
        waitForQualityGate abortPipeline: true

It’s work fine, but only when force user authentication disabled

I can’t leave this disabled for security reasons.

When force user authetication is enabled, I got this error Error 403 on : {"errors":[{"msg":"Insufficient privileges"}]}

I understand that I need to send the username and password when requesting the API, but how do I do it?

Sonarqube version 6.7.5 - Jenkins 2.176.1


You need to include the analysis token in the SonarQube Server configuration at the global level, then use that server config in the analysis. The docs should help.


5 posts were split to a new topic: Trouble setting up Jenkins analysis