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

sonarcloud
vsts

(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](http://redirect.sonarsource.com/doc/install-
configure-scanner-tfs-ts.html)
2018-10-18T13:38:06.1856258Z
==============================================================================
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
'sonar.coverage.exclusions=**/*'
For c# successful build:
'sonar.branch.name=develop
sonar.coverage.exclusions=**/*'
I tried setting 'sonar.branch.name=master' 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: https://sonarcloud.statuspage.io/ 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.

Thanks.


(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.

Thanks,
Pete