How do a make a Build Configuration for a specific branch?

I'm using TeamCity as the CI for my iOS app. I've created a bunch of different build configurations to test the app in different devices and now I want to publish the app to HockeyApp but only the changes in a specific branch.

I've created a Build Configuration called "Publish Beta Build" that has snapshot dependencies to all my other build configurations:

correct build chain.png

I've also set a VCS trigger that only listen to changes in the staging branch.

But if I manually click "Run" it will execute on the master branch and fail (because I put a command line build step that fails if not in the correct branch). The problem is that for TeamCity I've a failing build even though this Build Configuration should never be run in another branch.

I've tried to create a separate VCS Root but when I do so the snapshot dependency gets unreliable. A build that iniate on the staging branch is executed on the master branch on the other build configurations:

wrong commit on dependencies.png

Any ideas how can make the Publish Beta Build only get execute on the correct branch?

1 comment
Comment actions Permalink

One more problem I just found is that "Publish Beta Builds" configuration shows pending changes for all branches and not only for staging.

0

Please sign in to leave a comment.