Jenkins: How To Build multiple projects from a TFS repository?

I have set my workspace directory to C:\jenkins_builds\workspace and I want to build ProjA and ProjB, each having a local workfolder (same as project name).

When fetching the source code from my repository, the first two things the TFS plugin does are:

tf workspace -new %workspace-name-A%;%user-name% -server:%my-server% tf workfold -map $%branch% ProjA -workspace:%workspace-name-A% -server:%my-server%

Which goes fine when building ProjA. The problem is, the first command maps the root directory from the repository directly to my C:\jenkins_builds\workspace directory. The second command does what I actually want, i.e. mapping %branch% to the ProjA subfolder. Later on, when building ProjB, the first command fails (and consequently the build) with the following error message:

The path C:\jenkins_builds\workspace is already mapped in workspace %workspace-name-A%;%user-name%.

OK, it seems like a bad idea to map the root directory to the work directory. But why does this automatically happen when the TFS plugin runs the workspace new line? Currently I have to clean things up between building ProjA and ProjB by running the -unmap command.

My team is using Team Foundation 3.0.


We have the same situation and there are 2 ways to solve this:

    <li><strong>use different workspace-root-directories for the two builds</strong> This results in the need for two checkouts => double the space and slower, but better isolation between the two builds</li> <li><strong>"hardcode" the workspace name to the same for both builds</strong> By default jenkins creates a workspace containing the build name, which can be changed in the "advanced" section of the TFS config, and then you can use the same workspace-/workfolder-mapping for several builds - in our case we called them ProjectName_${NODE_NAME} so it even works on several nodes</li> </ul>


  • NHibernate: many-to-one and lazy
  • Servlet class com.foobar.jaxrs.application.MyApplication is not a javax.servlet.Servlet
  • Subsetting Data Frame into Multiple Data Frames in Pandas
  • Read File Content Line by Line from byte[] in Groovy
  • How to emulate integrated numeric keypad cursor keys in linux
  • Is it possible to collect a stream to two different collections using one line?
  • Can I put a + sign in a folder with IIS?
  • Doctrine2 inverse persistance not working in nested forms
  • Using SWIG with a build system [closed]
  • Efficient algorithm to find additions and removals from 2 collections
  • Google Maps api v3 get start and end coordinates of a street
  • Building Qt project for C++11 standard
  • UIAlertController button function not working
  • Elasticsearch script query involving root and nested values
  • Implicit joins and Where in Doctrine - how?
  • Scala multiline string placeholder
  • Android Google Maps API v2 start navigation
  • JBoss External Properties Files in Classpath
  • htaccess add www if not subdomain, if subdomain remove www
  • Rails Find when some params will be blank
  • Make VS2015 use angular-cli ng at build time in a .NET project
  • How to delay loading a property with linq to sql external mapping?
  • How to rebase a series of branches?
  • How do I fake an specific browser client when using Java's Net library?
  • How to add a column to a Pandas dataframe made of arrays of the n-preceding values of another column
  • script to move all files from one location to another location
  • Join two tables and save into third-sql
  • How to model a transition system with SPIN
  • ORA-29908: missing primary invocation for ancillary operator
  • How can I estimate amount of memory left with calling System.gc()?
  • Apache 2.4 - remove | delete | uninstall
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • How do I rollback to a specific git commit
  • using HTMLImports.whenReady not working in chrome
  • Hits per day in Google Big Query
  • Trying to get generic when generic is not available
  • Running Map reduces the dimensions of the matrices
  • How can i traverse a binary tree from right to left in java?
  • Android Heatmap on canvas or ImageView
  • Converting MP3 duration time