简体   繁体   中英

Trigger two build definition with one check in - Continuous Integration TFS

I have two build definition "A" and "B". I marked "A" to be triggered (Gated Check-in) when the check in include files under "src\\ProjectA" and "B" to be triggered when the check in include files under "src\\ProjectB" . It's working as expected when the chech-in include only one of the folders.

When the check-in include both of the folder and I click the CkeckIn button in Visual Studio I have to select which build I want to run (I choose "A") and only this build running and all the files are getting in, meaning that some code get into the repository that can break the build that didn't run ("B").

How can I make TFS run both builds whenever such a checkin will be delivered and not accept the change if all of the depended build get passed?

Each gated check-in build definition can have only one running build at a time. If you have two build definitions configured for the same source control folder then you will always get a choice . Your situation is very likely configured for the same source control folder.

It is recommended to have only check in each Project fold instead of check in include both of the folder together to avoid confusion. As a workaround you could first check in files in folder src\\ProjectA and then exclude others, after the gated check-in build completed, include other files again.

For more info of the TFVC gated check-in, you could take a look at James Reed 's answer in this question Can we build multiple gated check-ins in parallel?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM