I’ve been trying to configure a second Continua CI agent machine but keep getting an error from our FinalBuilder project we use for building. It appears to be trying to use the workspace for the 01 agent instead of the 02 agent. When the TFS Get action is configured, it uses a folder. We have mapped that folder in Visual Studio and have no issues getting latest in VS. Any suggestions? We’d really like to get our second agent running.
In the attached screenshot, you can see an example get action. The variable is populated with “D:\CI_AWS\WS\101”
How is the variable WorkspaceRoot set? If you want it to contain the Continua CI agent build workspace path, then you need to pass the value into FinalBuilder from Continua. You can do this by adding WorkspaceRoot=$Workspace$ to the Variables list under the Variables tab of the FinalBuilder action in Continua. The same applies if you are setting it to another folder such as your TFS workspace folder. e.g. WorkspaceRoot=\\MachineName\TFSWorkspaceFolder
Why not use the TFS repository in Continua to get the source code to your workspace? Continua repositories are designed to automatically check out the code for each revision in the background and seamlessly transfer your source code to each agent when you run a build. After setting up a Continua repository you can access the repository root folder using $Source.RepoName$ and pass this to your FinalBuilder action by adding WorkspaceRoot=$Source.RepoName$ to the Variables list.
The WorkspaceRoot variable is a local filepath as indicated by the FB help text, we have not tried using a workspace path for that. I’ll see if that works.
We have multiple gets in our FB project that get from different locations in TFS, common files used by the build process, that are not present in the source code for the different applications we’re building. One of those files contains a list that drives what applications the project gets and builds, actually.
There is no built-in FB variable named WorkspaceRoot, it must be a user-defined variable.
It’s really not clear what the issue is here, as you have not shown us how you are setting the value of WorkspaceRoot, described what you want the value to be set to, what the actual result is and the expected result is.
WorkspaceRoot is a custom variable, yes, the value is a local filepath, in this case D:\CI_AWS\WS\101.
I meant that the FinalBuilder Get action asks for the working folder, as in my screenshot above, not the workspace path. It appears to derive the workspace path by the working folder that’s defined here.
So we set the working folder of the Get action to “D:\CI_AWS\WS\101\4-Research\Automation\Build\FinalBuilder Projects\etc” to get these 3 particular files, and on the first agent server (PHUS-TFSAGT01) it works properly, it gets the files and moves on. On the second agent server (PHUS-TFSAGT02) we get the error message " The workspace PHUS-TFSAGT01\ServiceAccount does not exist."
The expected behavior is that it would look for the workspace PHUS-TFSAGT02\ServiceAccount.
OK, I think I understand the issue now. You need to setup the folder as a TFS workspace for the user account the the agent is running under. You can do this either by using Visual Studio while logged in as that user, or you can add a Team Foundation Create Workspace action before the Team Foundation Get action in FinalBuilder.