mohammed sameeh
mohammed sameeh

Reputation: 5099

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

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

Upvotes: 2

Views: 4497

Answers (1)

drk
drk

Reputation: 865

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))

Upvotes: 1

Related Questions