Is there any way to simulate dynamic YAML pipelines in Azure DevOps?

Viewed 340

What I'm thinking about is to have a step in the pipeline to generate a full-blown pipeline to run afterwards.

Apparently this particular thing is not there yet (feature requests here, here). But maybe somebody has some fresh thoughts on workarounds?

2 Answers

Not really. It's a pain that's just a fact of life when working with YAML pipelines. It's especially annoying when trying to work through runtime vs compile time variable resolution issues.

Commit, run, commit, run, commit, run, over and over.

For the dynamic work you could set up a repo with one dummy yaml file and a pipeline registration that targets this yaml file.

From a static pipeline that is responsible for kicking off a dynamic pipeline you then execute two steps:

  1. Create a fresh branch of that "dynamic" yaml file and commit the required dynamic workload

Not sure about branch limits though. You could also decide to reuse a branch.

  1. Kick off this "dynamic" pipeline through az devops cli using the static pipeline's access token

Also see the following documentation: https://docs.microsoft.com/en-us/azure/devops/cli/azure-devops-cli-in-yaml?view=azure-devops

Related