Combination of Azure DevOps with GitHub


I have a project with a very specific combination and would like to know if following combination is possible:

  1. Code is hosted in GitHub, PRs are done in GitHub
  2. Pipelines are run in Azure DevOps
  3. SonarQube is on premise server installation, not SonarCloud

Is it possible in this scenario, to let the Azure DevOps Pipelines do the analysis and report the status back to corresponding GitHub PRs?

In other projects we use Code + Pipeline in DevOps, where we have no such problem, but in this case our customer requires us to host the code in their GitHub now.

If this is possible, is there a hint how? Can we still use the Azure DevOps Pluing Tasks for it?

Thanks in advance.

Hey there.

Yes, this is supported out of the box, and automatically configured when using the Azure DevOps extension.

Hi Colin,

can you elaborate this a bit more please? When I try to add a SonarQube project and connect it to the Azure DevOps Project, it says that there is no repository so it cannot be done. Which is technically correct, as the Repo is in GitHub, only the pipelines are in DevOps.
How do I set this up properly?

What I am able to do is so far:

  • create the SonarQube project as local project
  • integrate SonarQube analyzer in Azure DevOps Pipelines and run it

What I miss:

  • how do I get the result back into GITHUB PRs if the Azure pipeline was triggered by a Github PR? Do I enable a GitHub Devops integration on this project (meaning install github sonarqube app etc)? Will this be able to report back the status to the proper GitHub PR then?

Thanks in advance!

Hey there.

You need to setup GitHub as a DevOps Platform Integration and create the project using that integration.

This can live alongside an existing Azure DevOps integration. It just means you’ll have two options (GitHub or Azure DevOps) when importing a project.

And then you just run your Azure DevOps pipeline as usual :slight_smile: The status will be reported back to the GItHub PR.