Multiple files to be downloaded for execution in the target machine

Apr 18, 2013 at 10:36 AM
Hi All,

I have a scenario where I have a power shell script file which does my deployment. The deliverables will be in a zip form where my deployment script has to unzip the assemblies before i start with the deployment. So i am using the 7zip's command line exe file for that. I have the exe in the TFS in a known location so that i can download it during the deployment.

<Mapping BuildDefinitionPattern="XXXX"
     Computer="SERVER1"
     OriginalQuality="*"
     NewQuality="Deploy to DEV"
     RunnerType="PowerShell"
     __Script="DoDeployment.ps1"__         
     NotificationAddress="user@domain.com"
     Status="Succeeded"  />
But it looks like the script tag in the deployment mappings file downloads only one file. Is there a way to dowload a bunch of file ?

With Regards,
S.Sudharsan
Coordinator
Apr 21, 2013 at 4:02 PM
Hi,

TFS Deployer should be downloading all the files in the same folder as the DoDeployment.ps1 script to the working folder on the TFS Deployer machine. If you put 7z.exe in that folder in source control, your deployment script will have access to it.

You can refer to the folder the deployment script is in via $PSScriptRoot in PowerShell v3, otherwise for PS v2 you can use:
Split-Path -Path $MyInvocation.MyCommand.Path

Regards,

Jason