1

On the Azure DevOps, in we git we have a schema of branches where we create a branch per sprint, for sample:

  • sprint01
  • sprint02
  • sprint03 ...

We keep the 3 last sprint branches, and in this case when I create the sprint4 branch, we will drop the sprint01. Each sprint We publish a version of our product every week. On the build pipeline definition on our project, we have defined the trigger to run over a push on the sprint* branch because we don't want to change the definition on each new version.

It works but it runs a build for each sprint branch and a release for each one. I would like to have just for that branch (with prefix sprint) that was pushed on the git. Is there any way to configure it?

My current configuration:

enter image description here

1 Answers1

0

It's recommended that you use a convention of prefixing your grouped references (like branches) with "folder" prefixes.

For example, when you create sprint branches, create them with the names:

sprints/sprint01
sprints/sprint02
sprints/sprint03

Then, configure your build trigger Include filters with this prefix:

sprints/*

... and then an Exclude filter for master, since by default it is also included.

Once configured, this should build only the sprint branch (topic branch) that was committed to.

Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/ci-build-git?view=azure-devops&tabs=designer

Sumo
  • 235
  • 1
  • 6