Schwarz
Schwarz

Reputation: 33

Run Build after Merging Branch - Team Foundation Server

Is it possible to run an Automated Build when you Merge a Feature Branch into the Development Branch?

When a Developer is done working on their Feature Branch, they will Merge the Feature Branch into the Development Branch. When it is Merge, I would like to fire off an Automated Build, that will run the Unit Tests.

With Continuous Integration, you run the Build when you check in a Changeset. I want to run Continuous Integration when I Merge a Branch into another Branch.

Upvotes: 3

Views: 1104

Answers (1)

Kritner
Kritner

Reputation: 13765

This isn't much different than setting up a build for a normal check in. You would just set up a trigger/build definition on the appropriate branch for the approriate reason. Once the merge is performed into the branch and checked in, this would trigger the build normally.

From my source view see:

enter image description here

KritnerWebsite is trunk, KritnerWebsite-branch is my dev branch.

I complete development/check-ins on the branch, then when done I merge into trunk. At which point the following build definition takes over:

enter image description here

Notice in above the monitored folder for the trigger (in this case gated check in) is my trunk folder in source control.

Hope this helps! :)

FYI a merge isn't actually a "merge" until you check it in and it becomes a changeset. When doing a merge, it actually just gets merged locally - into your workspace. You could technically do a local build at this point, but your build definition won't take over until you actually check it in. I'm not sure why Daniel felt this isn't an answer... as it's the same thing I went through when setting up build definitions for merges - but oh well.

Upvotes: 1

Related Questions