Using Perforce workspaces effectively with Bamboo
My employer uses Perforce and Bamboo in our continuous integration environment and we have a persistent problem with Perforce workspaces: they are a pain to maintain!
Our environment is set up like this:
Any time developers want to add a location to the workspace they need to update many workspaces. It's annoying and easy to mess up.
Is there any way to reduce the number of workspaces? Are there changes we can make to the way we structure things to make maintenance easier?
The simplest solution would be to use streams, which are essentially dynamic workspace templates.
A stream defines a set of depot paths, and a workspace can be linked to a stream rather than having a manually specified view. When a stream is updated, all workspaces that are linked to it are instantly updated to match. So if your projects were defined as streams, a developer updating the project would trigger automatic updates in all of the build workspaces that point to the same stream.
The manual alternative is to designate a master client workspace for each project to use as a template, and use the "p4 client -t" command to copy its view -- the trick is that this won't happen automatically as it does for stream workspaces, so you'd probably want to set up your own automation on the build system to make sure its workspace is up to date.
链接地址: http://www.djcxy.com/p/63216.html