How to setup autodiscovery and creation of new pipelines in Azure DevOps

Hi all. First time Azure DevOps user here and trying to figure out to migrate to Azure DevOps pipelines. I’ve managed to setup a simple POC pipeline for one Github repository and it seems pretty straightforwards and clear. But now my question is, how can I setup autodiscovery and creation of new pipelines, so I don’t have to manually create it everytime new microservice is born? Basically I would like that if developer creates a new repository and provides azure-pipelines.yml, it would automatically get picked up and the pipeline created.

There is no such functionality out of the box. You only choice would be to create everything either via the azure devops cli or azure DevOps REST API.

The only “builtin” would be to create one pipeline thats fully templetaised, then convert it to a Task Group and every new microservice you only need to create a new pipeline, use that Task Group and just ptovide service-specific values.
If you want to do use a yaml pipeline you can use yaml templates for the pipeline and again use variable values to pass to the pipeine

Ok, thanks! That’s good to know. The services are all pretty much the same, so it should be easy to template it all and use CLI or API . Maybe I can combine Github Workflow & Pipelines and have the Github Workflow create and maintain the pipeline but do the actual CI/CD via Azure.

Why would you need azure devops if you have github actions ?

I dont want to define 100 workflows for 100 services, and workflow sharing requires enterprise plan, $$$$.

So azure devops looks like a very nice solution for a decent price.

I think the pipeline actually should be created automatically when naming your YAML file azure-pipelines.yml or formerly vsts-ci.yml ?

There is literally no limit i know prohibiting you to automate as many workflows as you want with github actions in automated way that you can invoke from a github action by itself.
You can have a centralized repo with meta data that you manage when new web services are needed that do anything from creating a new repo, creating a new workflow from a template and all by injecting values as what you basically are aiming is a workflow that creates workflow. Only limitations is how many runner minutes you have per your license.
I might not understand the scenario, but i still dont see the need for azure devops

Yeah, I could create a centralized repo with workflow to manage all the other service repositories and their workflows. But it seems a lot of work for something I can get “for free” with Azure and if I pay Enterprise plan with Github. Maybe I’m missing something, as I don’t feel like my challenge is really all that uniq.

If your code is today in Github, You dont need to get any enterprise account, the simplest Team one is sufficient, potentially even the public one, but then all your repos have to be public.
You already have builtin good amount of build minutes you get out of the box.
your investment in azure devops yaml syntax go to waste if you later move to github, azdo isnt going to get a lot of functionality going further, not sure what you use now for agile planning for example. You dont get anymore free build minutes in azdo, means you have to pay for agents and you have to pay for licenses anyway after the builtin free 5 ones

So how would you set it up on github if you have about 100 services coming and going, and they all have pretty much identical workflow setup? Current setup is Gitlab and just using include directive from a shared repository where the workflow is defined.

Think there is something missing here, i can understand services growing in numbers, what does “coming and going means” exactly ?
I would basically use the GitHub rest with a powershell script tat accepts parameters.

If currently youre hosting your code in gitlabs, what stops you using gitlab rest api ?

Yeah, I’m not explaining myself well here. Let me try again. We’re basically looking into migrating from Gitlab to Github.
• It’s a standard microservices architecture with about 100 microservices alive
• Services change on a weekly basis as new ones are being added and old ones deprecated and removed. Meaning new repositories and ci/cd pipelines are added or deleted on a weekly basis.
• Each service follows the same workflow:
◦ build docker image
◦ run tests
◦ …
◦ deploy to stage
◦ with approval promote to prod
There’s not much else to it. The question is how can I easily manage this kind of setup without going and defining the workflow in each and every repo/service and when I need to do an update, go in and update all of them again manually.
I know I can “automate/simplify” this with creating some kind of tooling but I’d rather not and would rather use something native.

The native solutions that I have found so far:
• Azure DevOps with templating and extending
• Github Enterprise with Shared Workflows
• Gitlab with include directive
Does this make any sense?