teamcity - Team City: branch specification based on parent -


so when create branch in repo - it's either bugfix or feature. thing note either branch master or x. in team city want branch specification build if feature or bug fix came x not master, wondering if perhaps like:

+: feature* ^x

+: bugfix* ^x

or if there different way of handling this, please advise. want build if bugfix or feature came off of specific branch.

thanks

teamcity won't know parent rbanch of branch. can things

  1. give logical name branches come "x" ,(for ex call them x-)and set filter run on x-* named branches

  2. within teamcity target , run git command find parent branch , exit silently/failure if parent branch not x-branch (this feature not work if delete branch x. point parent of branch x , might master)

you can use below snippet

current_branch=`git rev-parse --abbrev-ref head` parent_branch=`git show-branch -a | ack '\*' | ack -v "$current_branch" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//'` 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -