[sonar-scanner-vsts] Provide error message when SQ task failed

vsts
azure

(Evgeny Ryabitskiy) #1

Here is fix: https://github.com/SonarSource/sonar-scanner-vsts/pull/59

Currently when Publish Quality Gate Result task failed, we get not informative message that task is failed.
To get more details user have to login in SonarCloud account for investigation and read error message from “Background tasks”. For example:

Actual error:

Error Details
#11111' is not a valid branch name. It can only contain 'A-Z', 'a-z', '0-9', '-', '_', '.', and '/')

In Azure DevOps (VSTS), I see only this not informative message:

##[section]Starting: Publish Quality Gate Result
==============================================================================
Task         : Publish Quality Gate Result
Description  : Publish SonarCloud's Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis.
Version      : 1.3.0
Author       : sonarsource
==============================================================================
##[error][SQ] Task failed with status FAILED
##[section]Finishing: Publish Quality Gate Result

Expected message in Azure DevOps (VSTS):

##[section]Starting: Publish Quality Gate Result
==============================================================================
Task         : Publish Quality Gate Result
Description  : Publish SonarCloud's Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis.
Version      : 1.3.0
Author       : sonarsource
==============================================================================
##[error][SQ] Task failed with status FAILED, Error message: #11111' is not a valid branch name. It can only contain 'A-Z', 'a-z', '0-9', '-', '_', '.', and '/')
##[section]Finishing: Publish Quality Gate Result

Quality gate task fails with error
(Julien Henry) #3

Thanks for the feedback. Ticket created, we will handle it during next sprint:
https://jira.sonarsource.com/browse/VSTS-180