Build multiple branches at once in a YAML pipeline
I have the following need: I want to produce/publish an artifact that is the result of multiple branches build.
Example: I have release/Update2, release/Update3, release/Update4, I want to build each of them to obtain Update2/Task.exe, Update3/Task.exe, Update4/Task.exe. And then zip them to release.zip.
I'd like to do it in YAML, but I can't find documentation saying how to build different branches at once. My other solution is to create a release pipeline on Azure DevOps, but I can't do it in YAML.
Is there a way to do this?
Solution 1:
You can use your yaml to build one default branch (like release/Update2). Additionally, add to yaml Command Line task with git checkout --force "your_branch"
and build steps. Consider using build templates to simplify your yaml file: Template types & usage