copy files from TFS to build drop location using copy directory activity

主宰稳场 提交于 2019-12-24 01:45:32

问题


my case , i want to copy from Folder TFS to build drop location when my build succeeded
i am using copy directory activity, in copy activity directory

  1. destination directory ="Build Drop Location"
BuildDetail.DropLocation
  1. source directory ="TFS Floder"

i know that build agent get source code from TFS to its machine on to this path

$(SystemDrive)\Builds\$(BuildAgentId)\$(BuildDefinitionPath)

, so how i want to get this path to use it in copy activity


回答1:


There is property in build workflow SourcesDirectory that holds the source folder, if you are not doing anything fancy with sources and definition is based on default it should be what you need.

Its based on following

String.Format("{0}\Sources", BuildDirectory)

The BuildDirectory is retrieved from build process and is the location defined in agent usualy as your linked ($(SystemDrive)\Builds\$(BuildAgentId)\$(BuildDefinitionPath))



来源:https://stackoverflow.com/questions/16267283/copy-files-from-tfs-to-build-drop-location-using-copy-directory-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!