Jon
Jon

Reputation: 8511

TeamCity Programmatically Build Branch

How do I get TeamCity to programmatically build from a specific branch?

In my use case I am trying to run a test suite against multiple environments. I have two TeamCity jobs. The first job will hit an endpoint to get the build version on the environment. The second job will check out the branch matching this build version and run my test suite.

I have a solution where I would checkout the correct branch as a build step but I feel like this is the wrong way. I feel like there should be an option in the Version Control Settings regarding which branch to use.

Upvotes: 1

Views: 133

Answers (1)

Nadia Burnasheva
Nadia Burnasheva

Reputation: 349

You can use the feature branches support in TeamCity. Specify a branch spec in VCS root, and when starting a build you can select on which branch you want to run it.

Upvotes: 1

Related Questions