Azure DevOps Publish Quality Gate Result v6 Failing with MS Hosted Agents

SonarQube version: 9.9.1
Azure DevOps “Publish Quality Gate Result” task version: 6.3.2
Azure DevOps Agent Pool: MS Hosted (windows-latest)

In Azure DevOps pipelines, getting the following error when running v6 of the “Publish Quality Gate Result” task on the MS Hosted agents:

##[error][SQ] API GET '/api/metrics/search' failed, error is Unexpected token < in JSON at position 0
##[warning]Error while executing SonarQube:Publish task: Could not fetch metrics
##[error]Could not fetch metrics
Finishing: SonarQubePublish
  • Runs successfully when using self-hosted/on-prem agents and v6 of the SonarQube tasks
  • It also runs successfully on the MS Hosted agents when using v5 of the SonarQube tasks.

This error went away in the new 7.x version of the pipeline task.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.