2

Is it possible programmatically to on a Gated -Check in build in TFS 2010 to not trigger a Gated Build when checking in a specific file type, i.e. ".config"? How can I accomplish that?

CJBS
  • 15,147
  • 6
  • 86
  • 135
LisDani
  • 41
  • 1

2 Answers2

0

Not that I know of, you can only configure the workspace mappings which controls when the build triggers. so you can include or cloak folders, but not file types.

Presumably you don't want to run the Gated Build because a config file won't affect the build. But still running the build anyways shouldn't really hurt anything, you just waste a little bit of resources on your build server.

If it's really a concern, you can customize the build template, to look at what files are in the linked changeset (using a custom activity and the TFS API probably), and if it's just config files abort the build (with a successful result).

Dylan Smith
  • 22,069
  • 2
  • 47
  • 62
  • That's what I thought too... can only cloak folders. The only work around I can see, is allowing to over-ride gated check in and get an alert when that happens, if the override contains anything other than the file type we want to exclude. – LisDani Jul 18 '14 at 19:32
0

I would go down the route of seeing what messages TFS processes when performing a gated checkin. It might be possible to some how write a TFS server side plugin to hook the event, inspect the changeset and stop the build while allowing the shelf set to commit.

You are swimming pretty far out of Microsofts swim lane on this one so I'm not sure how much work and what the side effects would be on this one.

FWIW, I would want the build to run even on a config file change because I always want to be able to deploy the latest build and see the state of my project.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100