AzureDevOps bulk import of repos in Sonarqube 9.9

Hello everyone, thank you for taking the time to read through this topic, here are some details:

  • SonarQube 9.9
  • SonarQube is deployed with Helm
  • I have the instance (Administration>General Settings>DevOps Platform Integration) linked with our AzDo service.

What I’m trying to achieve:
I’m looking for a way to bulk import repos from AzDo projects. If the project is imported upon first analysis it doesn’t seem to set the AzDo details on a project level thus, missing the report of quality gates in the PR.

What I have tried:
Going through the wizard. It allows only 1 by 1 import. Importing the projects on the first analysis doesn’t connect/add the Project AzDo settings and has to be manually added. Which obviously is less than ideal since we have a lot of projects and a lot of repos.

I’d be fine if there’s a way to automate adding the project settings of linking the repo and AzDo together.

If I have missed providing any details please let me know!

Hey there.

I suppose the internal POST api/alm_integrations/import_azure_project Web API could be used for automation combined with GET api/alm_integrations/search_azure_repos (you can see internal Web APIs in the Web API documentation by ticking “Show Internal APIs”)

I find it interesting we allow such bulk import in SonarCloud but not SonarQube. I’ve moved your post to the “Product Manager for a Day” category.

Hey Colin!

Thank you very much for the reply! I’ll take a look at the docs and I can smush something up then, otherwise a lot of clicking is to be done x).

Moving the topic to the new category is completely fine with me! Let me know if there’s anything more I can help with :slight_smile:

Best,
Risto