Automatically configure Azure DevOps integration for new projects

Hi there, I’m currently in the process of configuring a SonarQube 9.2.4 instance together with our pipelines.
When a project hasn’t been scanned before, it’s automatically created. However, the newly created project does not have Azure DevOps integration configured, and I need to manually select/configure the configuration name, project name, and repository name.
Is there any way of providing this information in the pipeline so that it’s automatically configured correctly when a new project is created in SonarQube?

I’ve moved your topic to Suggest New Features as this is not currently how SonarQube behaves.

hi @bcd and welcome to our community :slight_smile:
This is not the approach we recommend to use (using automatic creation of project from a CI), which explains why it’s not possible.

If you need to automate the project creation before running it the first time, you could write a script relying on our webAPI.
Moreover, I think the api/alm_settings/create_azure could help you configure your Azure configuration (though i’m not an expert, I’ll let you search for the right solution).

Hope to help :slight_smile:
Christophe

Thanks for the welcome Christophe :slight_smile:

Could you explain why automatic creation is not recommended? We’re exactly doing that right now, but if there are any downsides of course we’ll quickly change course.

Thanks for the pointer to the endpoint for the azure config, we do intend to create a script for new project onboarding soon so it’ll come in handy.