...
Action | Category | Description | Required parameters | Optional parameters | Output formats | |
---|---|---|---|---|---|---|
1 | Agent Assignments | Assign a project, plan, or job to a specific agent. This makes the agent is dedicated to only perform builds for all assignments. Use continue to ignore already exists error. |
| |||
2 | Agents | Add a local agent. |
| |||
3 | Artifacts | Add an artifact dependency to a job. Artifact must be a shared artifact from another job. |
|
| ||
4 | Artifacts | Add an artifact definition to a job. Server instances only. |
| |||
5 | Comments | Add a comment to a build. |
| |||
6 | Jobs | Add a job to a stage. |
| |||
7 | Labels | Add a comma separated list of labels to a build. |
| |||
8 | Notifications | Add a plan notification. There are 2 parts to a notification - an event that triggers the notification and a recipient type that determines the notification protocol. There are built-in notifications and others provided by add-ons. A recipient type may have additional parameters. Generally, these can be specified by the field and values parameters. In some cases, pre-defined parameters are available. | fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| ||
9 | Repositories | Add a global or plan repository. For a plan repository, you can reference a linked (global) repository. Otherwise a valid repository key or alias is required. Valid aliases are: BITBUCKET, BITBUCKET_CLOUD, BITBUCKET_SERVER, STASH, BCVS, GIT, GITHUB, MERCURIAL, PERFORCE, SUBVERSION | repository or name | plan, repositoryKey, replace, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| |
10 | Requirements | Add requirement to a plan job. |
| |||
11 | Stages | Add a stage to a plan. |
| |||
12 | Tasks | Add a task to a plan job. A valid task key or alias is required. Valid aliases are: ANT, ARTIFACT_DOWNLOAD, CHECKOUT, CLI_BAMBOO, CLI_BITBUCKET, CLI_CONFLUENCE, CLI_CRUCIBLE, CLI_FISHEYE, CLI_HIPCHAT, CLI_JIRA, CLI_SERVICE_DESK, CLI_UPM, GANT, GINT, GRADLE, GRADLEW, GROOVY, MAVEN2, MAVEN3, SCP, SQL, SCRIPT, SSH, VARIABLE_REPLACE | disable, final, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| ||
13 | Triggers | Add a trigger to a plan. Pre-defined types are: polling, remote, scheduled. One or more repositories can be specified for pre-defined type triggers based on repositories. Custom types can be specified with the appropriate trigger key (or alias) and all required parameters using the various field parameters. Alias types are: stashTrigger. | repository, schedule, ipRestriction, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| ||
14 | Variables | Add global or plan variables. Defaults to global variables unless a plan is specified. Use the field parameters for the variable name and the corresponding value parameters for the variable values, |
| plan, replace fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| |
15 | Plans | Clone a plan. |
| |||
16 | Projects | Clone each plan in a project to another project. If toProject is not provided, the plans will be cloned to the same project. If the toProject does not exist, it will be created with name provided by projectName. |
|
| ||
17 | Plans | Same as createPlan when plan does not exist. However, it will update an existing plan's name and description. Server instances only. |
| |||
18 | Plans | Create a new plan. Provide a 2-part plan key where the first part is the project key. If the project key does not exist, it will be created with the provided project name. Server instances only. Use continue to ignore the request if the plan already exists. |
| |||
19 | Plans | Delete a plan. |
|
| ||
20 | Projects | Delete project and all project plans. |
| |||
21 | Agents | Disable an agent. |
|
| ||
22 | Jobs | Disable a job from running. |
|
| ||
23 | Plans | Disable a plan from running. |
|
| ||
24 | Projects | Disable all project plans. |
|
| ||
25 | Agents | Enable an agent. |
|
| ||
26 | Jobs | Enable a job to run. |
|
| ||
27 | Plans | Enable a plan to run. |
|
| ||
28 | Projects | Enable all project plans. |
|
| ||
29 | Agents | Get a list of agents based on regex filtering of agent names.. |
| 1 - basic | ||
30 | Artifacts | Experimental - only those available to be artifact dependencies in the last job! Get a list of shared artifact definitions for a plan with regex filtering on artifact name. |
| |||
31 | Artifacts | Get a list of build result artifacts. When the build does not include a job portion, only shared artifacts are provided. Use @all for the job parameter to get both sharted and non-shared artifacts for all plan jobs. |
| |||
32 | Artifacts | Download a copy of a build artifact into a file. | Uses same parameters and logic as getArtifactList for identifying build result artifacts to search. For artifacts that represent a directory (not a file), use the artifact name plus the path to the file in the artifact. | job | ||
33 | Branches | Get a list of branches for a plan with regex filtering on branch name or short name. |
| |||
34 | Builds | Get a list of build reults. Build results can be filtered by using fields and values. Supported fields are state, notState, and started. For example, include only successful results by using: --field1 state --value SUCCESSFUL, or include only builds started after a specific date use: --field2 started --value2 2016-04-30 --dateFormat yyyy-MM-dd. Default limit is 25. | limit, favorite, labels, issues, columns, file, append, encoding, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 | 1 - basic | ||
35 | Builds | Get a list of builds waiting in the build queue. Subset by project or build. |
|
| ||
36 | Builds | Get build result. |
| |||
37 | Info | Get information about the this client tool. |
| 1 - basic | ||
38 | Comments | Get a list of comments for a build. |
| |||
39 | Jobs | Get a list of jobs for a plan with regex filtering on job key or name. Subset by stage if desired. |
| |||
40 | Labels | Get a list of labels for a build. |
| |||
41 | Builds | Get the number of the last completed build for this plan. |
|
| ||
42 | Notifications | EAP (subject to change). Get a list of plan notifications. |
|
| ||
43 | Plans | Get a list of plans for a project with regex filtering on plan key or name. Use @all for project to get a list of plans across all projects. | favorite, excludeDisabled, excludeEnabled, limit, regex, outputFormat, dateFormat, columns, file, append, encoding | 1 - plan | ||
44 | Plans | Get plan information. |
|
| ||
45 | Projects | Get a list of projects. Projects are selected based on regex filtering on project key or name. |
|
| ||
46 | Repositories | Get a list of global or plan repositories with regex filtering on repository name. |
|
| ||
47 | Repositories | Get details of a global or plan repository. Sets the repository and repositoryId replacement variables. |
| |||
48 | Info | Get information about the Bamboo server. |
| 1 - basic | ||
49 | Stages | Get a list of stages for a plan with regex filtering on stage name. |
| |||
50 | Tasks | Get a list of tasks for a job with regex filtering on task name. |
| |||
51 | Variables | Get a list of global or plan variables based on regex filtering of variable names. |
|
| ||
52 | Tasks | Move a task to before or after another task. Use final to make a task final. Final tasks must follow all non final tasks. If neither before or after are specified, the task will be moved to the last position respecting the final parameter. |
| |||
53 | Repositories | Order repository in the list of repositories for a plan. Defaults to move the repository to the top to make it the default repository. Otherwise specify the after respository name. |
| |||
54 | Builds | Queue multiple builds to run and wait for results. The action will not complete until all queued builds complete or times out. If continue is specified, builds will continue to be queued even after an attempt to queue a build fails. The action will fail if any build fails or times out. Conditional queueing is supported - see the documentation for details. | regex, limit, continue, timeout, dateFormat, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| ||
55 | 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. The action will fail if the build fails unless continue parameter is used to ignore a failed result. A specific revision can be built if the revision parameter is specified. Plan variables can be set using the field and value parameters. Conditional queueing is supported - see the documentation for details. | branch, revision, wait, continue, timeout, dateFormat, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| ||
56 | Agent Assignments | Remove an assignment from a specific agent. Use continue to ignore not found error. |
| |||
57 | Agents | Remove an agent. |
|
| ||
58 | Artifacts | Remove an artifact definition from a job. Server instances only. |
|
| ||
59 | Labels | Remove labels from a build. Labels can be a comma separated list or regex. Either build or search terms (searchLabels, issues) must be provided |
| |||
60 | Notifications | Remove a plan notification. Use id of -1 to remove all notifications for a plan. |
|
| ||
61 | Repositories | Remove global or plan repository. Use @all to remove all repositories. | repository or id |
| ||
62 | Requirements | Remove a plan requirement. |
|
| ||
63 | Stages | Remove a stage from a plan. Use id = -1 to remove all stages. Use continue to ignore not found errors. |
| |||
64 | Tasks | Remove a task from a plan job. Use id = -1 to remove all tasks. |
|
| ||
65 | Triggers | Remove a trigger from a plan. Use id = -1 to remove all triggers. Server instances only. |
|
| ||
66 | Variables | Remove global or plan variables. Specify the variable names using the field parameters. |
| plan, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| |
67 | Render | Render url based request. The response data modified by findReplace processing is returned. | requestParameters, requestType, type, acceptType, build, file, encoding, findReplace, findReplaceRegex |
| ||
68 | Builds | Restart a build that failed or was stopped. Use continue to ignore errors finding a build to restart or failed results. |
| |||
69 | Agents | Run actions for each agent with regex filtering on agent name. Available replacement variables are agent and agentId. |
| regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex |
| |
70 | CSV | Run actions generated from a CSV file. | common, propertyFile, continue, quiet, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex |
| ||
71 | Jobs | Run actions for each job with regex filtering on job key or name. Restrict to a specific stage or leave stage blank to get jobs across all stages. Available replacement variables are project, projectName, plan, planName, stageId, stageName, job, and jobName. | stage, regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex |
| ||
72 | 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 variables are entry, entry2. | list2, file, common, continue, quiet, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex |
| ||
73 | Plans | Run actions for each plan with regex filtering on plan key or name. Use @all for project to get a list of plans across all projects. Available replacement variables are project, projectName, plan, and planName. | favorite, excludeDisabled, excludeEnabled, regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex |
| ||
74 | Projects | Run actions for each project with regex filtering on project key or name. Available replacement variables are project and projectName. |
| regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex |
| |
75 | Repositories | Run actions for each repository with regex filtering on repository name. Available replacement variables are repository and repositoryId. |
| plan, regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex |
| |
76 | Run | Run actions generated by SQL provided by the sql parameter, a file, or standard input | common, driver, database, host, port, url, dbUser, dbPassword, propertyFile, continue, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex |
| ||
77 | Stages | Run actions for each stage with regex filtering on stage name. Available replacement variables are project, projectName, plan, planName, stageId, and stageName. | stage, regex, common, continue, simulate, clearFileBeforeAppend, file, encoding, findReplace, findReplaceRegex |
| ||
78 | Run | Run actions from a file or standard input. | file or standard input | common, continue, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex |
| |
79 |
| Set child dependencies and other related options. | children, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| ||
80 | Plans | Set the plan as a favorite. |
|
| ||
81 | Jobs | Set miscellaneous option for a job. The following options are specifically supported: clean working directory after job completes (cleanAfter switch) and pattern matching labeling (regex and labels parameters). Use the field and value parameters for additional settings with values determined from the screen. Some previous settings may be lost if not specifically requested. |
| |||
82 | Builds | Request to stop a queued or running build. Use continue to ignore errors finding a build to stop or failed results. The wait parameter will cause processing to wait for completion or timeout before returning. |
| |||
83 | Plans | Remove the plan from the favorite list. |
|
| ||
84 | Plans | Update a plans name or description. Provide a 2-part plan key where the first part is the project key. |
| |||
85 | Repositories | Update a global or plan repository. | repository or id | plan, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| |
86 | Requirements | Update a plan requirement. |
| |||
87 | Tasks | Update a task in a plan job. You must provide the same parameters as if you were creating the task. | enable, disable, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| ||
88 | Variables | Update existing global or plan variables. Defaults to global variables unless a plan is specified. Use the field parameters for the variable name and the corresponding value parameters for the variable values, |
| plan, fields, field1, value1, field2, value2, field3, value3, field4, value4, field5, value5, field6, value6, field7, value7, field8, value8 |
| |
89 | Misc | Validates the CLI Connector is enabled and licensed on the server. |
|
|
| |
90 | Builds | Verify build was successful. |
|
Parameter Tips
Common parameters
A few common parameters are available that are not specifically listed for each action: verbose, debug, quiet.
Tips
- Use single dash for single letter parameters - example: -v
- Use double dash for multi-letter parameters - example: --help
- When parameters are specified, most need a value - 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
- Some parameters become required once a specific action is chosen. This is indicated in the help text for each action.
- Some parameters have both short (one letter) and long (more than one letter) parameter names - example: -a or --action are the same
- Some parameters have default values, if so, they are indicated in the help text - example: (default: automation)
- Some parameters are required - indicated by (...) in the help text - example: (-a|--action) <action>
- Some parameters are optional - indicated by [...] in the help text - example: [(-f|--file) <file>]
- Values that have more than one word must be enclosed by double quotes - example: --title "this is my title"
- Quoting rules in commands can vary by environment , here are the techniques that may work in your environment:
- Many environments: embedded double quotes within a double quoted string can 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"" "
- Some environments may need different 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 quote - 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"
- To get help for a specific action (release 5.5 and above), type the action followed by --help - example: --action getProjectList --help
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 line 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.
Position | Character | Character name | Suggested alternate | Usage |
---|---|---|---|---|
1 | , | comma | Some parameters use comma separated lists. | |
2 | : | colon | # | Some parameters use colon separated values. |
3 | @ | at sign | ||
4 | ' | single quote | Used in separated lists to cover cases where content contains separator. | |
5 | " | double quote | ~ | Parameters containing blanks. |
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. Non standard characters will result in an authorization error similar to: User is not authorized to perform the request.
...