How to specify build arguments when starting a TFS build from the command line using tfsbuild.exe?

For my Team Build process, I created workflows that control the deployment. I want to choose the deployment deployment at runtime.

So, I need to send Deploy=true or false as input to the start of the workflow.

I can do this by specifying the metadata value of the workflow with an internal argument. I can then set the Deploy value at run time through the Build Queue dialog on the Options tabs.

My question is: how to specify my custom variable when starting a TFS build from the command line using tfsbuild.exe start ?

+4
source share
1 answer

The command line /msBuildArguments is called /msBuildArguments

 TfsBuild start teamProjectCollectionUrl teamProject definitionName [/dropLocation:dropLocation] [/getOption:getOption] [/priority:priority] [/customGetVersion:versionSpec] [/requestedFor:userName] [/msBuildArguments:args] [/queue] [/shelveset:name [/checkin]] [/silent] 

You can use: tfsbuild start http://yourserver:8080/tfs/ YourProject YourBuild Definition /msBuildArguments:"Deploy=true"

+4
source

All Articles