How to specify TFS Build Options in Powershell? -
i'm using tfs edit build deinition queue it. have need build server , build itself. can queue build, don't know how specify option when do. builds gated, , when manually queue them, have specify "latest sources" when so, not "latest sources shelvesets" seems default.
here example of i'm clicking when queue build manually.
below have coded far:
$teamprojectcollection = [microsoft.teamfoundation.client.tfsteamprojectcollectionfactory]::getteamprojectcollection("$serveruri") $bs = $teamprojectcollection.getservice([type]"microsoft.teamfoundation.build.client.ibuildserver") $build = $bs.getbuilddefinition("$project", "$template") #here of build editing, it's not important. $request = $definition.createbuildrequest() $bs.queuebuild($request, “none”)
this code works, don't know how specify option of "latest sources" on "latest sources shelveset". can help?
based on test, build project/solution latest source if shelvesetname null, can check build log whether builds project latest sources shelveset (doesn’t contain information shelveset if queue build latest source).
for gated check-in build, default option latest sources shelveset when queue build through vs ui, must specify shelveset name latest sources shelveset option, otherwise can’t queue build. in other words, shelveset name required latest source shelveset option.
so, queue build through tfs api, need let shelvesetname null queue build latest sources.
Comments
Post a Comment