SonarQube and Azure Devops

In our project, we use your SonarQube EE product and Azure Devops tool together.
During use, we needed to add more than one collection. After performing this operation, we realized that there was a problem in the analysis process.
Merge requests to master branch are displayed on SonarQube. Analysis result is also displayed, which is related pull request.
But the analysis of the last code cannot be displayed on the main branch. The main branch is waiting in an old date, with the quality gate fail state.
SonarQube version: 9.2


Welcome to the community!

Your version is past EOL. You should upgrade to the latest version at your earliest convenience. I know 9.2 isn’t very old, but it has been replaced by now.

But upgrading probably won’t address your issue. Unfortunately, I’m not clear on what the question is. Could you provide some more details?


Our server version upgrade from 9.2 to 9.4 Before upgrade, analysis for the master branch definitely didn’t work. Now it starts when we run it manually. However, although the analysis works for pull requests made in other branches, automatic analysis does not start for the master branch where the code is merged, it can be triggered manually.

Thanks for help.

Hi Emel,

This sounds like a question of your CI setup. Do you have a job that runs automatically when there’s a commit on the main branch?


Hi Ann,

Thank you for your response. You are right we have CI pipelines and it is commonly used GitFlow. Basicly we have a master branch for each project and feature branches that contribute new features to master branch. After a new feature completed we trigger a pull request to the master branch. Beside these flows master branch has a branch policy. That policy should satisfied by build, test and quality gate steps. SonarQube is one of the quality gates on branch policy. So it successfully runs for pull request and generates result. After the pull request succeed, the new code merges on master branch. But we can not see the results for the master branch on SonarQube, just results of pull request can be seen.

Maybe we should run periodic build to trigger master branch analys, but before use the SonarQube for multiple collection, we were able to see the results of pull request on master branch.

Hi @ozcanserhat,

Welcome to the community!

I guess you work with Emel?

IMO best case is that you’d run the job on the main branch after every commit. If you can’t do that, then a periodic build would be the fall-back.


Hi Ann,

Your welcome.

Yes you are right. We are working with Emel.

Thanks for your advice. We will apply the solution to handle urgent needs.
But I still wonder if is there any other way of solution.
SonarQube was able to handle the pull requests on master branch while working with the single collection. From this, I think we can expect to work with multiple collection with a same way.

Otherwise there will be consistency problem with current master branch repository and its shown statistics on Sonarqube until the periodic build run.

Can you please consider what is different between single and multiple collection modes?


Hi Serhat,

I’ll be honest and say I really don’t know what a “collection” is, or how it’s relevant to your CI jobs & analysis.

That said, I suspect this is really a question of getting your CI to fire the job. SonarQube analysis is triggered externally - by analysis. SonarQube doesn’t monitor your SCM to notice new commits or merges. That’s really your CI/CD’s job. If it’s not happening in some context… then it’s really a question of CI configuration.