Azure Devops / VSTS Publish Quality Gate Result task for sonarqube is failing builds


(loshurik) #1

I’m using sonarcloud in VSTS.
Starting from today some of my builds began to fail on Publish results step.

Tasks I use:
Prepare Analysis Configuration version 1.4.1
Run Code Analysis version 1.4.1
Publish Quality Gate Result version 1.3.0

Builds for develop branch pass without issues.
Builds for master branch run green with no warnings till Publish Quality Gate Result task.
It fails without showing the detailed error message:

2018-10-18T13:38:06.1853846Z ============================================================================== 
2018-10-18T13:38:06.1854138Z Task         : Publish Quality Gate Result 
2018-10-18T13:38:06.1854508Z Description  : Publish SonarCloud's Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis.
2018-10-18T13:38:06.1854795Z Version      : 1.3.0
2018-10-18T13:38:06.1854995Z Author       : sonarsource
2018-10-18T13:38:06.1855288Z Help         : [More Information](
2018-10-18T13:38:07.6364282Z ##[error][SQ] Task failed with status FAILED
2018-10-18T13:38:07.6448161Z ##[section]Finishing: Publish Quality Gate Result```

Here are my settings for c# failing build
For c# successful build:
I tried setting '' for the failing one, it doesn't help.

The same issue happens with sonarcloud publish task on javascript build.

Please advise.

(Xavier Bourguignon) #2

We got an outage on SonarCloud.

Check our status page: to see if it was on the timeframe of the incident

(loshurik) #3

I’ve just tried one more time right now
got failures for both case specifying and not specifying branch name “master”
with system.debug = true got details:

2018-10-18T14:35:13.9447918Z ##[debug]Response: 200 Body: “{“task”:{“id”:“AWaHmgvLkffOU2jHqOUd”,“type”:“REPORT”,“componentId”:“AWaHTbq4kffOU2jHqOBn”,“componentKey”:“ToolManager.API”,“componentName”:“ToolManager.API”,“componentQualifier”:“TRK”,“status”:“FAILED”,“submittedAt”:“2018-10-18T16:35:11+0200”,“submitterLogin”:“mylogin”,“startedAt”:“2018-10-18T16:35:11+0200”,“executedAt”:“2018-10-18T16:35:12+0200”,“executionTimeMs”:108,“logs”:false,“errorMessage”:“Project or branch in report (ToolManager.API) does not match the project or branch under which it was submitted (ToolManager.API:BRANCH:master)”,“hasScannerContext”:true,“organization”:“myorg”,“branch”:“master”,“branchType”:“LONG”}}”

(Xavier Bourguignon) #4

FYI, the incident was solved yesterday evening, so everything should be back to normal when new analyses are triggered.

(loshurik) #5

I’ve verified the builds, the error has gone.
Thanks for the heads up!

(Peter Connor) #6

Are you having problems again this afternoon? Our builds are just sitting on the publish step again.


(Fabrice Bellingard) #7

I’m sure you are not experiencing the same problem. There’s been an unexpected load on SonarCloud this afternoon, which caused delays in report processing. I guess the publish step failed due to a timeout - i.e. the analysis report was processed successfully but not as fast as the publish step would expect.

Can you confirm this was a timeout problem on the publish task?

(Peter Connor) #8

Yes you are right, it was just timing out. All running normal again this morning.


(Bertrand Thomas) #9


Since yesterday all our builds fail on Azure DevOps (VSTS) on “Publish Quality Gate Result” step:

2019-01-29T09:41:27.6430857Z ##[section]Starting: Publish Quality Gate Result
2019-01-29T09:41:27.6434119Z ==============================================================================
2019-01-29T09:41:27.6434378Z Task : Publish Quality Gate Result
2019-01-29T09:41:27.6434426Z Description : Publish SonarCloud’s Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis.
2019-01-29T09:41:27.6434487Z Version : 1.3.0
2019-01-29T09:41:27.6434527Z Author : sonarsource
2019-01-29T09:41:27.6434586Z Help : More Information
2019-01-29T09:41:27.6434647Z ==============================================================================
2019-01-29T09:41:28.9147866Z ##[error][SQ] Task failed with status FAILED
2019-01-29T09:41:28.9262816Z ##[section]Finishing: Publish Quality Gate Result

Status of SonarCloud seems fine (on the status page).

Would it be possible to have some help?


(Fabrice Bellingard) #10

Just had a look to our monitoring system, and I did not find any evidence of trouble on our side with report processing at this period of time.
Are you still experiencing this @devpro?

(Bertrand Thomas) #11

Thank you for the reply Fabrice.

I have found how to investigate, identified the issue and found a workaround: Publish Quality Gate Step is failing from Azure DevOps (VSTS)