Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excluding $tf folder in TFS 2015 - Copy and Publish Build Artifact

I'm trying to exclude $tf folder as part of artifact publishing using "Copy and Publish Artifacts" option as shown in the picture. But it always includes $tf folder and publishes all the files under this folder.

I tried this option, but no luck. https://social.msdn.microsoft.com/Forums/en-US/bb22c23e-cb44-44d2-8170-ba5609e9a688/need-help-excluding-the-tf-folder-and-sub-items?forum=TFService

"Copy files" is not an option for publishing artifacts, so it would be better if there is any option to exclude the folder. enter image description here

like image 791
Yass Avatar asked Jun 12 '17 14:06

Yass


1 Answers

Using Copy Files and Publish Build Artifacts tasks instead:

  1. Copy Files: Source Folder: $(build.sourcesdirectory); Target Folder: $(build.artifactstagingdirectory);

Contents:

**\*
!$tf\**
!**\$tf\**
  1. Publish Build Artifacts: Path to Publish: $(build.artifactstagingdirectory)
like image 121
starian chen-MSFT Avatar answered Sep 23 '22 17:09

starian chen-MSFT