buildbeat command line reference - dewapurnama · 1 using the buildbeat command line 1 ... hemaili...

27
BuildBeat Command Line Reference Timpani Software, Inc. September 2007

Upload: phungque

Post on 13-Apr-2018

227 views

Category:

Documents


3 download

TRANSCRIPT

BuildBeat Command Line Reference

Timpani Software, Inc.

September 2007

c©Copyright 2005-2007, Timpani Software, Inc.

BuildBeat Command Line Reference i

CONTENTS

1 Using the BuildBeat Command Line 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . 21.3 Using Interactive Mode . . . . . . . . . . . . . . . . . . . . . 21.4 Using Direct Exection Mode . . . . . . . . . . . . . . . . . . . 31.5 Using Batch Exection Mode . . . . . . . . . . . . . . . . . . . 3

2 Command Reference 52.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 addagent Command . . . . . . . . . . . . . . . . . . . . . . . 62.3 addconfig Command . . . . . . . . . . . . . . . . . . . . . . . 62.4 addlicense Command . . . . . . . . . . . . . . . . . . . . . . . 72.5 addproject Command . . . . . . . . . . . . . . . . . . . . . . 72.6 adduser Command . . . . . . . . . . . . . . . . . . . . . . . . 82.7 agents Command . . . . . . . . . . . . . . . . . . . . . . . . . 82.8 configs Command . . . . . . . . . . . . . . . . . . . . . . . . . 92.9 defaults Command . . . . . . . . . . . . . . . . . . . . . . . . 92.10 deleteagent Command . . . . . . . . . . . . . . . . . . . . . . 102.11 deleteconfig Command . . . . . . . . . . . . . . . . . . . . . . 102.12 deletelicense Command . . . . . . . . . . . . . . . . . . . . . 112.13 deleteproject Command . . . . . . . . . . . . . . . . . . . . . 112.14 deleteuser Command . . . . . . . . . . . . . . . . . . . . . . . 122.15 editagent Command . . . . . . . . . . . . . . . . . . . . . . . 122.16 editconfig Command . . . . . . . . . . . . . . . . . . . . . . . 13

ii

CONTENTS

2.17 editdef Command . . . . . . . . . . . . . . . . . . . . . . . . . 132.18 edituser Command . . . . . . . . . . . . . . . . . . . . . . . . 142.19 execute Command . . . . . . . . . . . . . . . . . . . . . . . . 152.20 exit Command . . . . . . . . . . . . . . . . . . . . . . . . . . 152.21 get Command . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.22 getcomminfo Command . . . . . . . . . . . . . . . . . . . . . 162.23 getdbinfo Command . . . . . . . . . . . . . . . . . . . . . . . 162.24 help Command . . . . . . . . . . . . . . . . . . . . . . . . . . 172.25 license Command . . . . . . . . . . . . . . . . . . . . . . . . . 172.26 project Command . . . . . . . . . . . . . . . . . . . . . . . . 172.27 set Command . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.28 setcomminfo Command . . . . . . . . . . . . . . . . . . . . . 182.29 setdbinfo Command . . . . . . . . . . . . . . . . . . . . . . . 192.30 testconnect Command . . . . . . . . . . . . . . . . . . . . . . 202.31 users Command . . . . . . . . . . . . . . . . . . . . . . . . . . 202.32 viewconfig Command . . . . . . . . . . . . . . . . . . . . . . . 202.33 view Command . . . . . . . . . . . . . . . . . . . . . . . . . . 212.34 viewproject Command . . . . . . . . . . . . . . . . . . . . . . 222.35 viewuser Command . . . . . . . . . . . . . . . . . . . . . . . . 22

BuildBeat Command Line Reference iii

CHAPTER 1

Using the BuildBeat CommandLine

1.1 Introduction

BuildBeat comes with a command-line utility, bb, that can be used to ad-minister BuildBeat databases and perform various tasks related to projects.

Using the bb command as an alternative to the other components includedwith BuildBeat has the following advantages:

• The command is cross-platform capable, allowing administration ofBuildBeat databases from non-Microsoft Windows platforms. Thegraphical administration utility, the BuildBeat Administrator, requiresa Microsoft Windows-based operating system.

• Allows for automation-driven access to BuildBeat databases. The bbcommand could be issued, for example, from scripting languages orbuild tools, enabling information to automatically be pulled or pushed

1

1.2. MODES OF OPERATION

to other applications.

1.2 Modes of Operation

The bb command can be used in one of three modes:

• Interactive Mode - Allows execution of one or more commands in aninteractive fashion. If a command is issued with an incomplete set ofparameters, bb will prompt you for the needed information. Interac-tive Mode can be very useful when you need to perform a large numberof administrative activities against a BuildBeat database, but humanintervention is needed to enter information as the process proceeds.

• Direct Execution Mode - Allows execution of a single command,with all command parameters being passed to the program on thecommand line. When the command has completed execution, theprogram terminates.

• Batch Execution Mode - Allows the execution of one or more scriptsthat have been stored in a command file. This mode is useful whenare large number of commands need to be executed in an automated,non-interactive fashion.

1.3 Using Interactive Mode

If you need to perform a large number of commands with bb, interactivemode is generally the best and easiest choice. In interactive mode, the bbprogram remains running after a command is issued, allowing you to easilyenter a new command. Interactive mode is recommended when you wishto perform a number of administrative actions, such as adding users andsetting up projects.

To enter interactive mode, simply type bb with no parameters. You will betaken to the bb command prompt, denoted by the characters bb 〉 appearingat the left margin of the command window.

BuildBeat Command Line Reference 2

1.4. USING DIRECT EXECTION MODE

From here, you can get a list of available commands by entering help. Fora detailed help on a particular command, enter help commandname.

To exit bb and return the the operating system’s command prompt, enterexit.

1.4 Using Direct Exection Mode

Direct execution mode of bb allows you to issue a single command and viewthe results. The output of the command is sent to standard output, whereit can be viewed directly, redirected to a file, or piped into another program.Direct execution mode is preferred if you are using bb from within a batchfile or shell script.

To use bb in direct execution mode, open a command shell in your operatingsystem, and enter bb followed by the name of the bb command you wish toexecute, followed by a series of parameters for that command.

Parameters in bb always take the form -paramname:paramvalue.

For a list of available commands, enter bb help. For a detailed description ofa command, including its required and optional parameters, enter bb helpcommandname

1.5 Using Batch Exection Mode

If you have a large number of commands to execute which do not requireinteractive entry of parameters, batch execution mode is recommended. Touse bb in batch execution mode, use bb as follows:

bb execute -s:filename

Where filename is the name of a text file containing bb commands. Eachcommand within the script file should be on separate lines.

This mode is similar to calling bb multiple times from within a batch fileor shell script. However, there is a subtle distinction. In direct execution

BuildBeat Command Line Reference 3

1.5. USING BATCH EXECTION MODE

mode, the bb command must reconnect to the BuildBeat database on eachinvocation of the command. In batch execution mode, bb connects once tothe database at the beginning of the script, and remains connected as itexecutes each command within the script. Thus, batch execution mode willgenerally be faster than making repeated calls to bb.

BuildBeat Command Line Reference 4

CHAPTER 2

Command Reference

2.1 Introduction

This chapter provides a detailed explanation of each bb command.

Each command contains the following sections:

• Description - A description of the command and what action it per-forms.

• Alias(es) - Lists the shortcut aliases, if any, for the command.

• Syntax - Describes how to issue the command.

• Options - Lists the options available for use with the command.

• Examples - Shows ways to use the command, with a brief explanation.

5

2.2. ADDAGENT COMMAND

2.2 addagent Command

Synopsis

Add a build agent to the BuildBeat server. Agents can perform buildtasks concurrently.

Options

-s:〈server name〉 Specify the server name or IP address.-p:〈port〉 Specify the communications port (e.g. 9050).

Example

addagent -s:192.1.1.108 -p:9050

2.3 addconfig Command

Synopsis

Add a server configuration.

Options

-n:〈config name〉 Specify the configuration name.

Example

BuildBeat Command Line Reference 6

2.4. ADDLICENSE COMMAND

addconfig -n:Master

2.4 addlicense Command

Synopsis

Add a BuildBeat licenses to your server. Distributed server licenses anduser licenses can be purchased http://www.buildbeat.com.

Options

-l:〈license〉 Specify the serial number.

2.5 addproject Command

Synopsis

Add a project to the BuildBeat server.

Options

-p:〈project name〉 Specify the project name.

Example

BuildBeat Command Line Reference 7

2.6. ADDUSER COMMAND

addproject "-p:Messaging Demo"

2.6 adduser Command

Synopsis

Add a user to the BuildBeat server.

Options

-u:〈loginId〉 Specify the login id. (Required)-p:〈password〉 Specify the password.-n:〈full name〉 Specify the user’s full name.-t:〈telephone〉 Specify the telephone number.-ext:〈extension〉 Specify the telephone extension.-email:〈email〉 Specify the user’s e-mail address.-sccid:〈sccid〉 Specify the external source control user id.-acc:〈projectIndex〉 Specify the project index for accessible projects.-sub:〈projectIndex〉 Specify the project index for subscribed projects.

Example

adduser -u:jsmith -p:js1qux "-n:Joe Smith"-t:641-1111 -email:jsmith@abc_corp.com

2.7 agents Command

Synopsis

List all registered build agents. Specifying build agents allow BuildBeat

BuildBeat Command Line Reference 8

2.8. CONFIGS COMMAND

to execute build tasks concurrently using one or more build machines.

2.8 configs Command

Synopsis

List all server configurations.

2.9 defaults Command

Synopsis

List configurable task and scc providers.

Syntax: defaults [options]

Options

-scc list only configurable source code contorl providers.-task list only configurable build task providers.

Example

List configurable source control providers.

BuildBeat Command Line Reference 9

2.10. DELETEAGENT COMMAND

defaults -scc

2.10 deleteagent Command

Synopsis

Unregister a build agent from this BuildBeat server.

Options

-s:〈server name〉 Specify the server name to delete.

2.11 deleteconfig Command

Synopsis

Delete a server configuration from this BuildBeat server.

Options

-n:〈config name〉 Specify the configuration name to delete.

BuildBeat Command Line Reference 10

2.12. DELETELICENSE COMMAND

2.12 deletelicense Command

Synopsis

Delete a BuildBeat licenses from your server.

Options

-l:〈license〈 Specify the serial number.-y No interactive prompt.

Example

deletelicense -y -l:22222-33333-44444-55555

2.13 deleteproject Command

Synopsis

Delete a BuildBeat project from your server. WARNING: Project datawill be permanently lost.

Options

-p:〈project name〉 Specify the project name.-y No interactive prompt.

Example

BuildBeat Command Line Reference 11

2.14. DELETEUSER COMMAND

deleteproject "p:Messaging Demo"

2.14 deleteuser Command

Synopsis

Delete a BuildBeat user from your server.

Options

-u:〈user loginId〉 Specify the user’s login id.

2.15 editagent Command

Synopsis

Edit a build agent to the BuildBeat server.

Options

-s:〈server name〉 Specify the server name or IP address.-p:〈port〉 Specify the communications port (e.g. 9050).-y No interactive prompt.

Example

BuildBeat Command Line Reference 12

2.16. EDITCONFIG COMMAND

editagent -s:192.1.1.108 -p:9050 -y

2.16 editconfig Command

Synopsis

Edit a server configuration of the BuildBeat server.

Options

-n:〈config name〉 Specify the configuration name.-newname:〈configname〉

Specify the new configuration name.

-y No interactive prompt.

Example

editconfig -n:Master -newname:Master2

2.17 editdef Command

Synopsis

Edit a configurable scc or task provider settings.

Syntax: editdef [options]

Options

BuildBeat Command Line Reference 13

2.18. EDITUSER COMMAND

-scc Edit a configurable source code contorl provider.-task Edit a configurable build task provider.-n:〈name〉 Edit code control provider or task provider name.

Example

editdefault -scceditdefault -scc -n:PVCS

2.18 edituser Command

Synopsis

Edit a user on the BuildBeat server. You will be prompted to modifythe user’s settings.

Options

-u:〈loginId〉 Specify the login id.-p:〈password〉 Specify the new password.-n:〈full name〉 Specify the new user’s full name.-t:〈telephone〉 Specify the new telephone number.-ext:〈extension〉 Specify the new telephone extension.-email:〈email〉 Specify the new user’s e-mail address.-sccid:〈sccid〉 Specify the new external source control user id.-y No interactive prompts.

Example

edituser -u:jsmithedituser -y -u:jsmith -t:265-0001 -ext:201

BuildBeat Command Line Reference 14

2.19. EXECUTE COMMAND

2.19 execute Command

Synopsis

Execute BuildBeat commands in a script file.

Options

-s:〈filename〉 Specify the script file name. (Required)

Example

execute "-s:/mybb/scripts/adduser.txt"(Contents of /mybb/scripts/adduser.txt)Line 1: setdbinfo -t:mysql -s:localhost -port:3306 -db:db1 -u:jsmith -p:js1Line 2: adduser -u:jsmith -p:js1qux "-n:J. Smith" -email:[email protected]

2.20 exit Command

Synopsis

Exit BuildBeat Administrator.

BuildBeat Command Line Reference 15

2.21. GET COMMAND

2.21 get Command

Synopsis

Get commonly used settings for this dbci session.

2.22 getcomminfo Command

Synopsis

Display current communication settings for BuildBeat Service. e.g. theIP address or host name running BuildBeat Service.

2.23 getdbinfo Command

Synopsis

Display current database settings where BuildBeat stores project, user,and service configurations.

BuildBeat Command Line Reference 16

2.24. HELP COMMAND

2.24 help Command

Synopsis

Displays help information for a given command

Syntax: help 〈command〉

2.25 license Command

Synopsis

List BuildBeat licenses on your server.

2.26 project Command

Synopsis

List all BuildBeat projects.

BuildBeat Command Line Reference 17

2.27. SET COMMAND

2.27 set Command

Synopsis

Set commonly used settings for this dbci session.

Syntax: set [options]

Options

-p:〈project〉 Specify the project you will use for this session

Example

Set the current project to “Messaging Demo” then view the project’s buildtask list.

set "-p:MessagingDemo"viewproj -task

2.28 setcomminfo Command

Synopsis

Set communcation settings for BuildBeat Service.

Syntax: setcomminfo [options]

Options

BuildBeat Command Line Reference 18

2.29. SETDBINFO COMMAND

-s:〈serverName | IPaddress〉

Specify the server name or IP address where the ser-vice is running.

-p:〈port number〉 Specify the port number for the server. Default is9050.

-t:〈server type〉 Server types are ’single’, ’master’ or ’agent’. Defaultis single.

-y No interactive prompts.

Example

setcomminfo -s:192.168.1.1 -p9050 -t:single -y

2.29 setdbinfo Command

Synopsis

Edit BuildBeat database settings.

Syntax: setdbinfo [options]

Options

-t:〈serverType〉 Specify the server type: mysql or sqlserver-s:〈serverName | IPaddress〉

Specify the server name or IP address where the ser-vice is running.

-port:〈port number〉 Specify the port number. Default port is 3306.-db:〈database name〉 Specify the BuildBeat database.-u:〈user name〉 Specify the database user name.-p:〈password〉 Specify the database user’s password.-y No interactive prompts.

BuildBeat Command Line Reference 19

2.30. TESTCONNECT COMMAND

Example

setdbinfo -t:mysql -s:192.168.1.1 -port:3306 -db:BuildDB -u:sa -p:abc123setdbinfo -t:sqlserver -s:DevPC -db:BuildDB -u:sqluser -p:abc123

2.30 testconnect Command

Synopsis

Test the connection to the database server.

2.31 users Command

Synopsis

List all BuildBeat users.

2.32 viewconfig Command

Synopsis

View all or a server configuration’s settings.

BuildBeat Command Line Reference 20

2.33. VIEW COMMAND

Options

-n:〈name〉 Specify the configuration name.-all View all configurations’ settings on this BuildBeat

server.-y No interactive prompts.

Example

viewconfig -n:Master1viewconfig -all

2.33 view Command

Synopsis

View a configurable scc or task provider settings.

Syntax: view [options]

Options

-all View all configurable providers.-scc View all configurable source code contorl providers.-task View all configurable build task providers.-n:〈name〉 View a configurable scc or task providers (with -scc

or -task).

Example

viewdefault -sccviewdefault -scc -n:PVCS

BuildBeat Command Line Reference 21

2.34. VIEWPROJECT COMMAND

2.34 viewproject Command

Synopsis

View a BuildBeat project settings

Syntax: viewproject [options]

Options

-p:〈projectName〉 Specify the project name.-all View all settings (default).-verbose Display detail information on the settings.-gen View general settings.-prop View property settings.-scc View source code control settings.-ci View continuous integration settings.-schedule View build scheduling settings.-tasks View build tasks settings.-unittest View unit testing settings.

Example

View detailed schedule and source control settings.

viewproject "-p:Sample Project" -verbose -schedule -scc

2.35 viewuser Command

Synopsis

View a user’s settings on the BuildBeat server.

BuildBeat Command Line Reference 22

2.35. VIEWUSER COMMAND

Options

-u:〈loginId〉 Specify the login id.-all View all undeleted users’ settings on this BuildBeat

server.

Example

viewuser -u:jsmithviewuser -all

BuildBeat Command Line Reference 23