Setting the "branchName" locator?

Hello,

I'm looking for help on a particular problem. I want to use the REST API to return the latest build for a project and branch, but the "branchName" property isn't getting set, so I can't search by it. I think I need to figure out how to configure TeamCity to set that property for builds, but I'm open to other ideas.

We use Git as our VCS, and we share a single VCS root among many projects. We created a build parameter named "system.branch", and we use it as the setting in the Default Branch field (%system.branch%) of the VCS root. To switch a branch for a project, we change this parameter's value at the project level and trigger a build. However, the build does not record the branch name (or any branch name, for that matter).

What I am I doing wrong? Is there any way to set that branch name for a build? Can it be done manually?

Thanks!

Please sign in to leave a comment.