SerG
SerG

Reputation: 1340

TFS publish build artifacts to share with custom path

Is it possible to publish build artifacts with paths other than original?

I have built folders with all necessary files to publish:

I want to get:

In Publish build artifacts step I specified

And get

Upvotes: 0

Views: 2109

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51073

You can use the Copy File task .In this task you could be able to the original directory structure and publish Build Artifacts through $(Build.StagingDirectory).

See this question for details: Copy one file in target directory on deploy from visual studio team services


Update

enter image description here

In your situation, the arguments should be(could change them based on your needs) :

Two copy files task for each project:

  • Source Folder: $(Build.SourcesDirectory)\SolutionName\ProjectName\bin\$(BuildConfiguration)

  • Contents: **\*

  • Target Folder: $(Build.StagingDirectory)\$(Build.BuildNumber)\$(BuildConfiguration)\projectX

One Copy and Publish Build Artifacts

  • Mostly the same with my screenshot above, Artifact Type should be File share and Path \\share

Finally, you will get the result as below: enter image description here

Upvotes: 1

Related Questions