Getting an error in the azure DevOps pipeline for The "path" argument must be of type string

Hi,

Getting an error in the azure DevOps pipeline, I am new to this please guide me if there is a relevant solution for this. thank you!

##[error]The "path" argument must be of type string. Received type undefined

[image]

Hi,

Could we have more context? Let’s start with your full analysis log, starting from the analysis (or begin) command.

 
Ann

Hi, we are using a task that involves like Reokace token in the application.yml and ACR secrets and deploying Kubernetes.

and sonarqube is configured on javascript code.
we are getting error like this 2022-06-09T05:10:28.2382095Z ============================================================================== 2022-06-09T05:10:33.5085543Z ##[error]The "path" argument must be of type string. Received type undefined 2022-06-09T05:10:33.5123631Z ##[section]Finishing: Publish Quality Gate Result

also getting an error in sonarqube like branch has no lines of code.
please help us it is quit urgent.

Hi,

I’d really like to see a little more of the log leading up to the error, please.

 
Ann

Hi, these are some logs and steps I am using to get it run, please help me out for this following error.



Hi,

Based on your second screenshot, and on this from the docs:

Then, follow the steps in SonarQube to analyze your project. SonarQube automatically sets the project settings required to show your Quality Gate in your pull requests.

I suspect the problem might be related to the distance in your pipeline between analysis and Quality Gate publishing. I guess the context is being lost in the interim, although the error message you’re getting really isn’t helpful to diagnose that.

The point of publishing your QG status back into ADO is so you can make decisions based on the value. You’ve added publishing at the very end, after the deployment step. Is this really what you want? To deploy even with a failing Quality Gate?

Can you move the publish step to right after the analysis and see what happens?

 
Ann

Hi,

ye sure I tried with and move the publish step to right after the analysis getting the same error as above that The “path” argument must be of type string. Received type undefined 2022-06-09T05:10:33.5123631Z ##[section]Finishing: Publish Quality Gate Result

@SWARAJ_SIRSAT could you re-run the pipeline with system diagnostics enabled, and then share the log output for the Publish Quality Gate step?

Thanks.