Reference - 4.1.0

On this page

Related information for 4.1.0

Actions

Action

Category

Description

Required parameters

Optional parameters

Output formats

1

addComment

Comments

Add a comment to a build.

build, comment

number, findReplace, findReplaceRegex, file, encoding

 

2

addLabels

Labels

Add a comma separated list of labels to a build.

build, labels

number

 

3

addRepository

Repositories

Add a source repository to a build plan.

plan, repositoryKey

fields, field1, value1, field2, value2, field3, value3, field4, value4

 

4

addRequirement

 

Beta. Add requirement to a plan job.

plan, job, requirement

type, value

 

5

addTask

Tasks

Add a task to a build plan job.

plan, job, taskKey

fields, field1, value1, field2, value2, field3, value3, field4, value4

 

6

clonePlan

Plans

Clone a build plan.

plan, toPlan

name, description, disable

 

7

cloneProject

Projects

Clone each build plan in a project to another project.

project, toProject, disable

 

 

8

deletePlan

Plans

Delete a build plan.

plan

 

 

9

deleteProject

Projects

Delete project and all project plans.

project

file

 

10

disablePlan

Plans

Disable a build plan from running.

plan

 

 

11

disableProject

Projects

Disable all project plans.

project

 

 

12

enablePlan

Plans

Enable a build plan to run.

plan

 

 

13

enableProject

Projects

Enable all project plans.

project

 

 

14

getArtifact

Artifacts

Download a copy of a build artifact into a file.

build, artifact, file

number

 

15

getBuildList

Lists

Get a list of builds.

 

file, attribute, favourite, expand, labels, issues, columns

 

16

getBuildQueueList

Lists

Get a list of builds waiting in the build queue. Subset by project or build.

 

project, build, file, columns

 

17

getBuild

Builds

Get build result.

build

number, expand, file

 

18

getClientInfo

Info

Get information about the this client tool.

 

 

 

19

getCommentList

Lists

Get a list of comments for a build.

build

number, file, columns

 

20

getLabelList

Lists

Get a list of labels for a build.

build

number, file, columns

 

21

getLatestBuildNumber

Builds

Get the number of the last completed build.

build

 

 

22

getPlanList

Lists

Get a list of build plans.

 

project, favourite, file, attribute, expand, columns

 

23

getPlan

Plans

Get build plan information.

plan

 

 

24

getProjectList

Lists

Get a list of projects.

 

file, attribute, expand, columns

 

25

getServerInfo

Info

Get information about the Bamboo server.

 

outputFormat, dateFormat

1 - basic
2 - detail

26

queueBuild

Builds

Queue a build to run. If wait is specified, the action will not complete until the queued build completes or the timeout period elapses.

build

revision, wait, continue, timeout, fields, field1, value1, field2, value2, field3, value3, field4, value4

 

27

removeLabels

Labels

Delete labels from a build. Labels can be a comma separated list or regex. Either build or search terms (searchLabels, issues) must be provided

labels

build, number, searchLabels, issues, favourite

 

28

removeRepository

Repositories

Remove a source repository from a build plan.

plan, id

 

 

29

removeRequirement

 

Beta. Remove a plan requirement.

plan, job, id

 

 

30

removeTask

Tasks

Remove a task from a build plan job.

plan, job, id

 

 

31

renderRequest

Render

Render url based request. The response data modified by findReplace processing is returned.

request

requestParameters, requestType, type, build, file, encoding, findReplace, findReplaceRegex

 

32

runFromCsv

Run

Run actions generated from a CSV file.

file

common, propertyFile, continue, quiet, simulate, encoding, findReplace, findReplaceRegex

 

33

runFromList

Run

Run actions for each entry in a list. When file is provided, each action in the file augmented by the common parameter will be run for each entry. Otherwise, just the action specified by the common parameter will be run. Available replacement variable is entry.

list

file, common, continue, quiet, simulate, encoding, findReplace, findReplaceRegex

 

34

runFromSql

Run

Run actions generated by SQL provided by the sql parameter, a file, or standard input

sql or file or standard input

common, driver, database, host, port, url, dbUser, dbPassword, propertyFile, continue, simulate, encoding, findReplace, findReplaceRegex

 

35

run

Run

Run actions from a file or standard input.

file or standard input

common, continue, simulate, encoding, findReplace, findReplaceRegex

 

36

updateRepository

Repositories

Update a source repository for a build plan.

plan, id

fields, field1, value1, field2, value2, field3, value3, field4, value4

 

37

updateRequirement

 

Beta. Update a plan requirement.

plan, job, id

type, value

 

38

updateTask

Tasks

Update a task in a build plan job.

plan, job, id

fields, field1, value1, field2, value2, field3, value3, field4, value4

 

39

validateLicense

 

Validates the CLI Connector is enabled and licensed on the server.

 

 

 

40

verifyBuild

Builds

Verify build was successful.

build

number

 

Parameter Tips

Common parameters

A few common parameters are available that are not specifically listed as optional parameters for each action: helpverbose, debug, quiet, special, dateFormat, dateFormat2, and outputType. Similarly for database related parameters that are optional for all get list actions: url, dbUser, dbPassword, database, driver, dbJarhost, portdbCreateTable, dbTable, dbTableKeys, afterSql, and propertyFile.

Tips

  • To get help for a specific action, type the action followed by --help - example: --action getProjectList --help
  • Use double dash for multi-letter parameters - example: --help
  • Use single dash for single letter parameters indicated in the Short column in parameter help - example: -v
  • When parameters are specified, most need a value as indicated by a check in the Value column in parameter help - example: --action addPage
  • Some parameters are flags (boolean) and must not be followed by a value - example: --verbose
  • Parameter names are case sensitive, but, action values are not - example: --userid is invalid but --action addpage is equivalent to --action addPage
    • An incorrect case parameter will result in an unknown parameter error and show action help with correctly cased parameter (9.8 or higher)
  • Some parameters become required once a specific action is chosen. This is indicated in the action help text as required.
  • Some parameters have both short (one letter) and long (more than one letter) parameter names - example: -a or --action are the same and cannot both be specified
  • Some parameters have default values, if so, they are indicated in the help text
  • Values that contain blanks or some special characters (platform specific) must be enclosed by double quotes - example: --title "this is my title"
  • Quoting rules in commands can vary by terminal environment:
    • Windows command terminals or run action scripts for all platforms: embedded double quotes within a double quoted string must be escaped by doubling the double quote - example: –common "-a addComment --comment ""This is an example of a double quoted string inside a double quote"" "
    • Linux and Mac/OSX command terminals require standard Linux style escaping: embedded double quotes within a double quoted string can be escaped with a \ - example: –common " -a addComment  --comment  \"This is an example of a double quoted string inside a double quote\" "
    • Run CLI Actions usage: embedded double quotes within a double quoted string can be escaped by doubling the double quote (first example above)
    • A single quote sometimes can used in place of a double quotes on some command terminal environments - example: –common '-a addComment --comment "This is an example of a double quoted string inside a double quote" '
  • Some parameters allow entry of a comma separated list of values, values containing a comma must be enclosed in single quotes - example: --custom "'first:a,b,c', second:x". Embedded single quotes within a quoted string must be doubled
  • Some text fields support the automatic conversion of " \n " (blanks are significant) to be replaced with a new line character - example: --description "A multi-line text field: \n # line 1 \n # line 2"

Special parameter

Some special characters are difficult to deal with or make action text very complicated. This is because they have special meaning in either the OS command terminal handling, the tool's command line parsing, or the tool's use of separators (like comma or colon separated lists). As a convenience to avoid some of these nasty situations, a special parameter was implemented to allow alternate characters to be used instead of (or in addition to) the problematic characters within parameter values. The choice of what special characters to use depends on the content so that you do not have conflicts with intended content. The special parameter works by the user providing a order specific alternate character. The alternative character is replaced with the real character after all other parsing occurs. It is implemented for many action parameters that are problematic in this area. Not all situations are covered, but, that will improve as other use cases are identified.

PositionCharacterCharacter nameSuggested alternateUsage
1,comma
Some parameters use comma separated lists.
2:colon#Some parameters use colon separated values.
3@at sign
Replacement variables syntax: @...@.
4'single quote
Used in separated lists to cover cases where content contains separator.
5"double quote~Parameters containing blanks.
6^caret
Substitution double quote indicator: ^^...^^. See ACLI-673 for details. 

A blank in any position is ignored (no alternate provided).

Example: –special " #  ~" provides alternates for colon and double quote. 
         --common "--findReplace ~something to find containing a : (colon)#replacement~"  

Character Set

User and password values should be in the ISO-8859-1 character set. Also avoid characters that require escaping on your OS command terminal. Non standard characters will result in an authorization error similar to: User is not authorized to perform the request.

 

Parameters

Parameter

Short

Value

Description

1

action

a

(tick)

 

2

api

 

(tick)

API version. Some requests produce different results based on the api version used. (default: latest)

3

artifact

 

(tick)

Build artifact name. May be extended by a path name for locating files within an artifact representing a dirctory.

4

attribute

 

(tick)

Attribute to list.

5

build

 

(tick)

Build key. Optionally, for some actions, may contain build number. Example: XXX-DEF or XXX-DEF-1

6

columns

 

(tick)

Column selection and ordering when action generates CSV output. A comma separated list of column numbers (1-based) or column names (case insensitive). Only columns provided by the selected outputFormat are available for selection. Invalid columns will be ignored.

7

comment

 

(tick)

Comment for an build.

8

common

 

(tick)

Common parameter string added to all run actions.

9

connectionTimeout

 

(tick)

Allow overriding environment settings for connect and read timeouts on URL connections. In milliseconds, 0 means infinite.

10

continue

 

(error)

Continue processing even after errors are encountered.

11

cookies

 

(tick)

Name of file to restore and persist cookies across invocations of CLI actions. Can be used to provide Data Center session affinity for actions using REST APIs.

12

database

 

(tick)

Database name is required for SQL actions.

13

dateFormat

 

(tick)

Format string for date in Java SimpleDateFormat, default is client date format.

14

dbPassword

 

(tick)

Database user password. Defaults to password.

15

dbUser

 

(tick)

Database user name. Defaults to user.

16

debug

 

(error)

Requests detail debug output. Optional for all actions.

17

description

 

(tick)

Build plan description.

18

disable

 

(error)

Disable plan after it is created.

19

driver

 

(tick)

JDBC driver class or predefined value: postgresql, mysql, mssql, oracle, or db2400. Required for SQL actions.

20

encoding

 

(tick)

Character encoding (character set) for text based file content - must be an encoding supported by your JAVA platform.

21

expand

 

(tick)

Expanded request information to obtain more detailed data on request.

22

favourite

 

(error)

Subset to favourites.

23

field1

 

(tick)

Task specific field or build variable name. Complements the fields parameter. Value is specified by the value1 parameter.

24

field2

 

(tick)

Task specific field or build variable name. Complements the fields parameter. Value is specified by the value2 parameter.

25

field3

 

(tick)

Task specific field or build variable name. Complements the fields parameter. Value is specified by the value3 parameter.

26

field4

 

(tick)

Task specific field or build variable name. Complements the fields parameter. Value is specified by the value4 parameter.

27

fields

 

(tick)

Use to specify task specific fields or build variables and their values. A comma separated list of key:value pairs. Single quote the key:value pair if it contains a comma (,) or line breaks.

28

file

f

(tick)

Path to file based content or result output. Use - for standard input.

29

findReplace

 

(tick)

Find and replace text. Comma separated list of colon separated pairs. Single quote values containing a delimiter. Embedded quotes must be doubled.

30

findReplaceRegex

 

(tick)

Find and replace text with a regular expression. Comma separated list of colon separated pairs. Single quote values containing a delimiter. Embedded quotes must be doubled.

31

help

 

(error)

Prints this help message.

32

host

 

(tick)

Database host server for SQL actions. Not used if url is provided. (default: localhost)

33

id

 

(tick)

Task id.

34

issues

 

(tick)

Comma separated list of JIRA issue keys.

35

job

 

(tick)

Job key. Example: JOB1

36

labels

 

(tick)

Comma or blank separated list of labels.

37

list

 

(tick)

Comma separated list of entries. Single quote values containing a delimiter. Embedded quotes must be doubled.

38

login

 

(tick)

Login token from previous login request.

39

loginFromStandardInput

l

(error)

Get login token from standard input. Only applies to lLegacy client actions!

40

name

 

(tick)

Build plan name.

41

number

 

(tick)

Build number. Defaults to latest. (default: 0)

42

outputFormat

 

(tick)

Specify output format for an action. (default: 1)

43

password

p

(tick)

User password for remote access.

44

plan

 

(tick)

Build plan key containing the project key. Example: XXX-DEF

45

port

 

(tick)

Database host port for SQL actions. Optional, defaults to database default. Not used if url is provided.

46

project

 

(tick)

Project key. Example: XXX

47

projectName

 

(tick)

Project name.

48

propertyFile

 

(tick)

Property file with mapping information.

49

quiet

 

(error)

Limit some output messages. Optional for all actions.

50

repositoryKey

 

(tick)

Repository key. Example: com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-mercurial:hg

51

request

 

(tick)

URL fragment for a request.

52

requestParameters

 

(tick)

URL request parameters

53

requestType

 

(tick)

Type of a render request like GET or POST (default: GET)

54

requirement

 

(tick)

Plan requirement key, either a custom key or a system capability key like: system.builder.ant.Ant.

55

revision

 

(tick)

Revision id or tag.

56

searchLabels

 

(tick)

Comma or blank separated list of labels used for search.

57

server

s

(tick)

Server URL.

58

service

 

(tick)

Service address extension. (default: /rest/api)

59

simulate

 

(error)

Simulate running actions. Log the action that would be taken.

60

special

 

(tick)

Ordered list of alternate characters for comma ( , ), colon ( : ), at ( @ ), quote ( ' ), and double quote ( " ) characters used for specialized processing of some specific parameters.

61

sql

 

(tick)

SQL select statement used to generate a run script.

62

stage

 

(tick)

Stage name.

63

taskKey

 

(tick)

Task key. Example: com.atlassian.bamboo.plugins.scripttask:task.builder.script

64

timeout

 

(tick)

Wait timeout in seconds. Use -1 to wait forever. (default: -1)

65

toPlan

 

(tick)

Build plan key to be created. Example: XXX-DEF

66

toProject

 

(tick)

Project key to clone to.

67

type

 

(tick)

Requirement match type. Values: exist, equal, match. Also, content type for renderRequest. (default: exist)

68

url

 

(tick)

Action specific setting. Example: Database access url for SQL actions. Optional when host is provided.

69

user

u

(tick)

User name for remote access. (default: automation)

70

value

 

(tick)

Requirement match value.

71

value1

 

(tick)

Value corresponding to the field1 parameter name.

72

value2

 

(tick)

Value corresponding to the field2 parameter name.

73

value3

 

(tick)

Value corresponding to the field3 parameter name.

74

value4

 

(tick)

Value corresponding to the field4 parameter name.

75

verbose

v

(error)

Requests verbose output to help with problem determination. Optional for all actions.

76

wait

 

(error)

Wait for action to complete.

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.