Before Beta3, builds could be fired only through the UI. Now a command line alternative is available. The command line tool also provides options to stop and delete a build. The latter functionality is not available through the UI. The tool provides a command line help which explains the parameters required by the commands. This blog attempts to cover this new functionality.
Start
Starting a build requires START_BUILD permissions. Scenarios where you might want to use the command line to start a build are:-
D:\Program Files\Microsoft Visual Studio 8\Common7\IDE>TFSBuild.exe start http://btnhydbb03:8080 MyTestTeamProject MyTestTeamBuildTypeMicrosoft (R) TfsBuild Version 8.0.0.0for Microsoft (R) Visual Studio 2005 Team System Copyright (C) Microsoft Corporation 2004. All rights reserved.Build number: MyTestTeamBuildType_20050926.2Initializing build Getting sources Compiling sources Compiling ConsoleApplication1.sln for Any CPU/Release Compiling ConsoleApplication1.csproj Compiling TestProject1.sln for Any CPU/Release Compiling TestProject1.csproj Compiling WindowsApplication1.sln for Any CPU/Release Compiling WindowsApplication1.csproj Getting changesets and updating work items Running tests Running tests for Any CPU/Release Copying binaries to drop location Copying log files to drop location Successfully Completed Dump 1 Command line start console output
Compare this with the build report shown through the UI:-
Stop
A user starting the build or having ADMIN_BUILD permission can only stop the build.
D:\Program Files\Microsoft Visual Studio 8\Common7\IDE>tfsBuild stop http://btnhydbb03:8080 MyTestTeamProject MyTestTeamBuildType_20050926.3 /noprompt Microsoft (R) TfsBuild Version 8.0.0.0 for Microsoft (R) Visual Studio 2005 Team System Copyright (C) Microsoft Corporation 2004. All rights reserved. Stopping MyTestTeamBuildType_20050926.3... Done Dump 2 Command line stop console output
Delete
ADMIN_BUILD permissions are required to delete a build. Deleting a build having tests enabled also requires PUBLISH_BUILD permisssions.
D:\Program Files\Microsoft Visual Studio 8\Common7\IDE>tfsBuild delete http://btnhydbb03:8080 MyTestTeamProject MyTestTeamBuildType_20050926.1 MyTestTeamBuildType_20050926.3 /noprompt Microsoft (R) TfsBuild Version 8.0.0.0 for Microsoft (R) Visual Studio 2005 Team System Copyright (C) Microsoft Corporation 2004. All rights reserved. Deleting MyTestTeamBuildType_20050926.1... Done Deleting MyTestTeamBuildType_20050926.3... Failed The path is not of a legal form. Dump 3 Command line delete console output
The failure to delete the last build is a known issue in Beta3 bits. This happens when a build that was stopped in the "Initializing Build" step is attempted to be deleted. The build has been deleted from the database; but not from the drop location. The workaround is to manually delete the folder from the drop share.
About Me
I have been at Microsoft for just over an year in the discipline of Test. Reading fiction is one of my hobbies that is still alive:-). I am onto "The Fountainhead" these days. Puzzleses excite me; and nothing is more attractive than what eludes me. Writing blogs is out of that elusive list now:-)