Publish Quality Gate Result. Path must be a string. Received undefined

Hi , First of all, I am new to SonarQube and SonarCloud. I just started picking up yesterday. I am using Azure DevOps. I managed to connect to service with extension and publish the result successfully in Build Pipeline.

Then I setup Release pipeline with same configuration. It run successfully one time but now I am getting “Path must be a string. Received undefined” in “Publish Quality Gate Result Task”. It successfully can and completed and “Run Code Analysis” task though.

Not sure what I am missing and not able to find any useful answer also.

Appreciate your help in advance.

image

Hi,

can you give more details, especially what you get from the logs?

Overall Job Status :

From Publish Quality Gate Result Log:

2018-10-05T02:17:27.0605421Z ##[section]Starting: Publish Quality Gate Result
2018-10-05T02:17:27.0608682Z ==============================================================================
2018-10-05T02:17:27.0608768Z Task : Publish Quality Gate Result
2018-10-05T02:17:27.0608841Z Description : Publish SonarCloud’s Quality Gate result on the VSTS/TFS build result, to be used after the actual analysis.
2018-10-05T02:17:27.0608901Z Version : 1.3.0
2018-10-05T02:17:27.0608965Z Author : sonarsource
2018-10-05T02:17:27.0609022Z Help : More Information
2018-10-05T02:17:27.0609099Z ==============================================================================
2018-10-05T02:17:29.9264762Z ##[error]Path must be a string. Received undefined
2018-10-05T02:17:29.9338924Z ##[section]Finishing: Publish Quality Gate Result

Hi,

Can you provide the same log but enabling verbose output (set debug variable to “true” when queuing the build).

Thanks

Trick the task in the release pipeline by creating a variable, scoped only for that stage, called build.artifactStagingDirectory set to $(SYSTEM.ARTIFACTSDIRECTORY), tricking the task into behaving as if within a Build pipeline (for which it was designed for).

1 Like

Same issue here.
1_Code Analysis.zip (101.6 KB)