Quantcast
Channel: Team Foundation Server - General forum
Viewing all articles
Browse latest Browse all 6687

Echo command line build script in new line in TFS

$
0
0

We have an existing build definition which creates a command file 'ToQA.cmd' which we use to ftp packages to our QA server from our integration server. Although it is command file, we cannot just double click and execute script. We have to navigate to the folder where the command file exists, copy the script and paste it in command prompt to execute it. The problem is when we double click command file, it runs under c:\users\[userid] and obviously the file doesn't exist in that location and it fails. Now i am trying to update build definition, so that it first navigates to the folder where the command file exists something like this:

cd c:\build\buildNumber folder
powershell -File ftp.ps1 11.11.11.111 NewBuild.www_20140512.1

Here is the existing build definition:

<mtbwa:InvokeProcess FileName="cmd.exe" sap:VirtualizedContainerService.HintSize="200,184" WorkingDirectory="." DisplayName="Create the QA CMD file"><mtbwa:InvokeProcess.Arguments>[String.Format(&quot;/C echo powershell -File ftp.ps1 11.11.11.111 {1} &gt;{0}\{1}\toQA.cmd&quot;,BuildInstallFolder,BuildDetail.BuildNumber)]</mtbwa:InvokeProcess.Arguments><mtbwa:InvokeProcess.ErrorDataReceived><ActivityAction x:TypeArguments="x:String"><ActivityAction.Argument><DelegateInArgument x:TypeArguments="x:String" Name="errOutput" /></ActivityAction.Argument><mtbwa:WriteBuildError Message="[errOutput]" /></ActivityAction></mtbwa:InvokeProcess.ErrorDataReceived><mtbwa:InvokeProcess.OutputDataReceived><ActivityAction x:TypeArguments="x:String"><ActivityAction.Argument><DelegateInArgument x:TypeArguments="x:String" Name="stdOutput" /></ActivityAction.Argument><mtbwa:WriteBuildMessage Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[stdOutput]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" /></ActivityAction></mtbwa:InvokeProcess.OutputDataReceived>
/mtbwa:InvokeProcess>

I tried to echo new line i.e echo. also used && sign and that didn't help. I am not expert in writing build definition or in batch script so wondering if anyone can help me with this?

Thanks.



creativity..


Viewing all articles
Browse latest Browse all 6687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>