Branch filter issue
Answered
Hi Team,
We have branches like master, release/abc,release/xyz and others,
Our requirement is to have the option to run build only for master and release branches with this format release/...,
However when we kept the branch filter as +:master-- it gives the option to run in master, however for release when I give the filter +:release/*
It shows only branches with name release/release/abc to run the build, my question is how can we filter out branches for release/abc and others in this format, do we make some changes in branch specifications? Currently branch specifications filter all the branches
Please sign in to leave a comment.
Hello,
Could you please share the branch specification for this VCS root?
+:refs/heads/(master)
+:refs/heads/feature/*
+:refs/heads/release/*
+:*
Thank you! Branch filter works with logical branch name (which, in your case, would be the part of branch name covered by the asterisk). Suppose you have a branch called
Then with above branch specification it will appear in TeamCity as
You may ensure that the "release" is part of branch name by modifying the branch specification as following:
Then the branch filter will properly handle such branches. Please let me know if this helps.
Hi, thank for your response, in the branch filter I could see the same results with new changes in branch specifications, to select the v1 branch as per your example except any other feature branch I will need to specify +:v1 only, I wanted to select all the branches which starts with release/v1 but could not find a way to specify that in branch filter after specifying
+:refs/heads/(master)
+:refs/heads/feature/*
+:refs/heads/(release/*)
+:*
in branch specifications
Please advise
Hello,
If you currently have
in your branch specification, and you want to ensure only release/v1*** branches are triggered, then you could use the following branch filter:
Please let me know if this helps.
Great it worked thanks, I used +:release/* in branch filter and now I could see all the branches with name release/abc release/BCD e.t.c