poovarasan
poovarasan

Reputation: 21

How to create single pipeline(s) for all projects in an organization

I have more than 35 projects in an organization in Azure DevOps. These are the solutions of a Single product. Right now I am creating build and release pipelines for each project one by one.

If I create a pipeline for a single project and release the build, I want devops to create pipeline & releases builds for all the other projects(in the same organization) together at once.

For eg, There are projects A,B,C & D. If I create a release pipeline for Project A, will Devops automatically Release build for other projects "B,C & D" in the same organization at the same time.

We need to avoid creating pipelines for each projects one by one. Is this possible and is there any scripting or configuration to achieve this?

Thanks in Advance.

Upvotes: 0

Views: 1373

Answers (1)

bryanbcook
bryanbcook

Reputation: 18128

The process of setting up multiple release definitions with the exact same tasks can be very time consuming and difficult to manage -- fortunately, our team solved this problem using Task Groups!

Task Groups allow you to bundle multiple steps into a single "group", parameterize them, and then invoke them like a single step. You can also edit the Task Group at any time which will cascade to all places where it's used.

The other consideration is that you can bundle your custom variables into Variable Groups and reuse them between Release Definitions. Having your configuration reusable also has the benefit of only having to edit a single item.

I'd recommend:

  1. Create a single release definition as a golden reference example.
  2. Add your build steps for a single stage/environment
  3. Once you're happy with this release definition, multi-select the steps you want to bundle into a group, open the context menu and select the option to convert to a Task Group. This will remove the steps from your release and move them to the Task Group.
  4. Customize the Task Group with the appropriate parameters and then save it.
  5. Modify your release definition to use the Task group parameters.
  6. Add the additional stages to your environment, and add your custom Task Group to each parameterizing with configuration specific to the environment.
  7. Once you're happy with the Release Definition -- use the Clone feature to create 34 more instances.

The same approach can be applied to builds.

Upvotes: 1

Related Questions