开发者

Preventing Checkin to trigger multiple Build with TFS 2010

开发者 https://www.devze.com 2023-04-08 05:37 出处:网络
I have some Libraries added in my TFS 2010 project in a Lib folder. Each time I check In a dll in the Lib folder, all the build that reference that Lib folder trig automatically (more than 20 Build).

I have some Libraries added in my TFS 2010 project in a Lib folder. Each time I check In a dll in the Lib folder, all the build that reference that Lib folder trig automatically (more than 20 Build).

I can use the ***NO_CI*** to prevent that. But I prefer to have something automatic. Is it possible to have an event handler on TFS to prevent that.

Ex. 开发者_如何学GoIf the check in is on that folder, do not scan all the CI Build Workspaces to trig the build.


The workspace mapping in the build definitions defines which files/folders are part of that build. You can use cloaked folders to explicitly exclude folders from the workspace.

However, the workspace mapping is used for 2 purposes: to determine which files get downloaded to the build server as part of the build, and to determine which files trigger CI/Rolling/Gated builds.

If you exclude folders from the workspace (e.g. using cloaked folders) it will stop the builds from being triggered but it will also stop those files from being downloaded as part of the build.

If you want to have a build download a certain folder as part of the build but not have builds triggered by check-ins to that folder I don't believe it is possible without customizing the build workflow.


When you include a folder in a workspace, you're saying that changes to that folder affect your project. This is the same for changes to shared source code as for shared binary. If it changes, then the affected applications should be built (and their automated tests should be run) so taht it can be determined whether the changed files have broken anything.


Make sure each library in the lib folder has it's own folder + version folders beneath

lib
  EntityFramework
    4.1
      EntityFramework.dll     
    4.2
      EntityFramework.dll

Then modify your builds to only reference specific folders for the library a project references.

It takes a lot of work to setup builds, but will ensure the build only triggers when a file needed for the build is changed.

Alternatively a copy of each library in the projects directory, which you could manage with a package manager like NuGet or OpenWrap

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号