Reputation: 1402
Right now I have a build definition setup in TFS 2017 that uses the Publish Artifact:drop build step.
In that build step I have $(build.artifactstagingdirectory) as the 'Path to Publish' and \\server\share\folder as the Path.
This works, but I get \\server\share\folder\drop\AppName\bin\Release with my files inside of the Release folder.
How can I tell TFS to just output the files right into \\server\share\folder?
Upvotes: 1
Views: 1342
Reputation: 26982
Rather than modifying your Publish Artifact step you want to arrange the files in your $(build.artifactstagingdirectory)
in the way you want them published to your drop folder.
Given you likely have a Copy Files to: $(build.artifactstagingdirectory) step, in TFS 2017 (Update 1) you can check Flatten Folders under Advanced and this will drop the file contents into the root of your artifact staging directory.
I don't believe there is a way to get around having the artifact name ("drop" in your case) forming part of the path, but with Flatten Folders all files should be dropped in the root of \\server\share\folder\drop
Edit
An alternative is to specify something like the below in the copy files step. Provide the relative path to your bin\release directory, then use the minimatch **
pattern in the contents field to copy everything in that directory
Upvotes: 1