mieliespoor
mieliespoor

Reputation: 1073

Azure DevOps Trigger build on release/{version} branch

For Azure DevOps, how can you automatically build when you create a release branch in the formation release/{version}?

Looking at the triggers tab of a build, the filter allows me to select a branch, but that is only for pre-defined branches, and not a branch type / format.

I don't know yet what the branch name will be as it will follow a version string format like release/{major}.{minor}.

Any ideas how this can be achieved?

Upvotes: 2

Views: 1351

Answers (2)

sa.as
sa.as

Reputation: 461

Instead of selecting a branch, you can also enter a variable that contains the branch name.

For example, if variable $(currentReleaseBranch) contains the value releases/M23 then you can enter this variable in the branch field.

A release will be triggered if the build is from releases/M23. Variables from variable groups can be used across multiple release pipelines

Upvotes: 0

4c74356b41
4c74356b41

Reputation: 72151

you can just type in whatever you like, so in your case use:

release/*

Reading: https://learn.microsoft.com/en-us/azure/devops/pipelines/release/triggers?view=azure-devops#release-triggers

Upvotes: 3

Related Questions