I created a bug on GitHub <https://github.com/gocd/gocd/issues/5427> because it turns out that it actually isn't relevant whether or not Destination Directory contains the file name to be used or not; TFS checkout just straight up fail if the Project Path is a single file rather than a directory.
I still feel that this can be solved by telling the underlying TFS agent to create a server workspace instead of a local one but I have no idea how to do that. If anyone has any ideas, I'd love to hear them. Regards, Jason On Tuesday, 6 November 2018 15:58:37 UTC-5, Jason Smyth wrote: > > Here is a slightly modified version of the materials element for one of > our live pipelines that demonstrates why, for us, including a file name in > the dest attribute is sometimes necessary to allow proper relative file > paths: > > > > <materials> > > <tfs url="http://tfs.mydomain.com:8080/tfs" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/Products/MyGreatProduct/Trunk" > dest="tfs/Products/MyGreatProduct/Trunk" materialName="tfs" /> > > <tfs url="http://tfs.mydomain.com:8080/tfs" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/AssemblyInfo.cs" dest="tfs/AssemblyInfo.cs" > materialName="AssemblyInfo" /> > > <tfs url="http://tfs.mydomain.com:8080/tfs" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/CommonServices" dest="tfs/CommonServices" > materialName="CommonServices" /> > > <tfs url="http://tfs.mydomain.com:8080/tfs" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/ThirdParty" dest="tfs/ThirdParty" > materialName="ThirdParty" /> > > <tfs url="http://tfs.mydomain.com:8080/tfs" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/packages" dest="tfs/packages" > materialName="packages" /> > > <tfs url="http://tfs.mydomain.com:8080/tfs" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/Products/MyGreatProduct/Documents/Spec" > dest="tfs/Products/MyGreatProduct/Documents/Spec" materialName="Spec" /> > > <tfs url="http://tfs.mydomain.com:8080/tfs" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/Internal/BuildTargets" > dest="tfs/Internal/BuildTargets" materialName="BuildTargets" /> > > <tfs url="http://tfs.mydomain.com:8080/tfs" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/Internal/BuildScripts" dest="BuildScripts" > materialName="BuildScripts" /> > > </materials> > > > > Again, any insight on this is appreciated. > > > > Thanks, > > Jason > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf > Of *Jason Smyth > *Sent:* November-06-18 10:30 AM > *To:* [email protected] > *Subject:* RE: [go-cd] TFS Checkout Fails After Updating from 15.2 to > 18.10 > > > > Hi Ketan, > > > > I created a simple pipeline that runs as a test. Here is the full XML for > that pipeline: > > > > <pipeline name="Test-FileCheckout"> > > <materials> > > <tfs url="http://tfs.mydomain.com:8080/tfs/DefaultCollection" > username="myServiceAccount" domain="mydomain" encryptedPassword="REDACTED" > projectPath="$/MyTeamProject/AssemblyInfo.cs" dest="tfs/AssemblyInfo.cs" > materialName="AssemblyInfo" /> > > </materials> > > <stage name="defaultStage"> > > <jobs> > > <job name="defaultJob" /> > > </jobs> > > </stage> > > </pipeline> > > > > This pipeline runs successfully under version 15.2 but file checkout fails > under version 18.10. > > > > Please let me know if there is any additional information I can provide. > > > > Regards, > > Jason > > > > *From:* [email protected] [mailto:[email protected] > <[email protected]>] *On Behalf Of *Ketan Padegaonkar > *Sent:* November-06-18 9:56 AM > *To:* [email protected] > *Subject:* Re: [go-cd] TFS Checkout Fails After Updating from 15.2 to > 18.10 > > > > Could you perhaps paste a snippet of the <materials/> XML element in your > config for us to check what's up? > > > - Ketan > > > > > > On Sat, Nov 3, 2018 at 1:57 AM Jason Smyth <> wrote: > > While testing an update from version 15.2 to 18.10 we have run into an > issue that may be bug in either GoCD or the TFS JDK that it uses. > > > > For reasons that I won't go into, we have several pipelines that include > multiple TFS materials, some of which are single files from our TFS > repository. For example: > > > > - AssemblyInfo > > > - Project Path: $/TeamProjectName/AssemblyInfo.cs > - Destination Directory: tfs/AssemblyInfo.cs > > > - Packages: > > > - Project Path: $/TeamProjectName/packages > - Destination Directory: tfs/packages > > We have to include the file name in the AssemblyInfo material's > Destination Directory (DD) because otherwise the Packages material's DD > appears to be nested inside the AssemblyInfo DD and GoCD throws an error > when trying to save the configuration. > > > > On version 15.2 everything works as intended but after updating the GoCD > agent fails to check out the AssemblyInfo material with an error like the > following: > > > > Failed while checking out into Working Folder: > pipelines\MyPipeline\tfs\AssemblyInfo.cs, Project Path: > $/TeamProjectName/AssemblyInfo.cs, Workspace: > bb18a58c6abfa36db84643de09258c86feaa48bc711174334eaea61594b9623f, Username: > BuildUser, Domain: mydomain, Root Cause: java.io.FileNotFoundException: > E:\GoCD\Go > Agent\pipelines\MyPipeline\tfs\AssemblyInfo.cs\$tf\5\377de3f5-a6f8-41ed-970a-9b0bbf2c1a50.gz > (The system cannot find the path specified) > > > > This error is consistent across all tested pipelines that follow this > format. > > > > Based on the path of the file that is triggering the > FileNotFoundException, it seems as if the agent is attempting to create the > $tf directory required by a local TFS workspace inside the file that it is > trying to check out. Since you can't create a directory inside a file, this > fails and eventually results in the FileNotFoundException being thrown when > the checkout process tries to access a file from the $tf directory. > > > > It would seem that an easy fix would be to tell the agent to use a server > workspace instead of a local one but I haven't been able to find a way to > configure that option. > > > > Does anyone have any experience with this issue or any suggestions on how > we can overcome it? > > > > In case it's relevant we are running GoCD server on a 64-bit Linux system > and the agent is Windows Server 2012R2 64-bit running the agent bundled > with 32-bit Java. > > > > Thanks in advance for any advice you can offer, > > Jason > > > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "go-cd" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/go-cd/00PZ6loeunk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "go-cd" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/go-cd/00PZ6loeunk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
