Sonarqube integration


I have some queries

I am trying to integrate the sonarqube with azure pipeline for pull request analysis for the pull request analysis i am trying to connect the sonarqube and azure Devops but i am unable to connect both is that needed any admin access for sonarqube ?

My sinario is if the developer can create pull request at that time the code scan was happened at that time code scanner is pointing any issue the azure pipeline build is should be failed. → is this possible to create → if possible how to create i want to know the steps ( I tried in google i didn’t get the exact details for those two topics. Could any one please help me for this.

What have you tried to connect the two, and what error did you get?


I am trying to scan the pull request if any issues in the code.
Azure Devops build is to be failed this task I am during currently for that pull request has i can able to create it but it won’t scan any codes with sonarqube.

I don’t see any errors are showing on the screen i am just blocked with i mentioned above.

Could you please let me know the process for that.

Hi, One clarification - I am using two azure repos - one is old one and another one is new repo but the code and pipelines are same (i pulled it from my old repo ) here i am trying to scan the pull request with sonar from the new repo isn’t working. but i tried with old repo is working fine i could see the output but new repo PR is created but i couldn’t see any output from sonar.

I need to create any new connection request for new repo ?

Could you please guide me with that issue.

It sounds like you might be missing a branch policy on the second repo that requires a run of the pipeline (which includes sonarqube analysis) on a pull request.

Hi I haven’t enabled the branch policy but i have enabled the build validation here my query is - i want to run one sonarqube pipeline in that pipeline it failed in the build validation part. here how to skip this process in the pipeline ? 2. If the condition wasn’t met the pipeline job should be completed - May i know the process for this ?

Hey there.

I don’t really understand the question. Can you try rephrasing it or providing a detailed example?