Parameters
Parameters
These tell the CLI the specific details needed to perform an action. Some actions work without any additional details, but most require one or more parameters and accept additional optional parameters to perform its task. In fact, the CLI requires at least one special parameter named action (that tells what action to perform), without which CLI simply displays help with some example actions. Parameters do not have prefixes like actions and are often very specific to the app for the action.
Consider an example action getServerInfo that requires details about the app (or server) from which the information is retrieved. This is accomplished using the server parameter. The getServerInfo action also accepts optional parameters such as outputFormat, dateFormat, file, append, and encoding.
Parameter | Short | Value | Multiple Use Allowed | Description |
---|---|---|---|---|
--acceptType |
|
| Content type to accept for renderRequest if different than contentType. | |
--accessKey |
|
| Secret access key for AWS credentials. | |
--accessKeyId |
|
| Access key id for AWS credentials. | |
--action | a |
| Requested operation to perform. Valid actions are listed separately. | |
--after |
|
| Used in orderRepository to name the repository after which the repository will be positioned. Similarly for moveTask where it represent the name or id of the task. Similarly for moveStage where it represent the name of the stage. | |
--afterSql |
|
| SQL to run after a successful action. Limited to specific actions at this time. | |
--agent |
|
| Agent name. | |
--app |
|
| App key. | |
--append |
|
| Append to existing variables on updateVariables. For some actions using the file parameter, append will append output to the existing file. | |
--artifact |
|
| Build artifact name. May be extended by a path name for locating files within an artifact representing a directory. | |
--assignment |
|
| Key used to identify a project, plan, job, deployment project, or environment to be assigned to a specific agent. This makes the agent dedicated to only perform builds for all assignments. Examples: XXX, XXX-DEF, XXX-DEF-JOB1, Deployment for XXX-DEF, Deployment for XXX-DEF:QA, 77857004-77955436 | |
--autoAgent |
|
| When referencing an agent, automatically create a local agent if it does not already exist. | |
--automatic |
|
| Indicate that a stage be run automatically. | |
--autoStage |
|
| Automatically create a stage on moveJob if it does not already exist. | |
--before |
|
| Before task name or id. | |
--branch |
|
| Plan branch name normally. In the context of a repository it can reference a repository branch. | |
--build |
|
| Build key. Normally used to refer to a specific build (3 or 4 part name). However, it was also an older terminology for a plan and some action continue to accept the older terminology. Example: XXX-DEF or XXX-DEF-1 | |
--capability |
|
| Capability name (label) or key. | |
--childPlans |
|
| Comma separated list of plan keys that represent child plan dependencies. | |
--cleanAfter |
|
| Clean working directory after each job completes. Use on setJobOptions. | |
--clearFileBeforeAppend |
|
| For run actions, this option will automatically clear an existing file on the first append requested. | |
--columns |
|
| 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. | |
--comment |
|
| Comment text. | |
--common |
|
| Common parameter string added to all actions in the run script. | |
--connectionTimeout |
|
| Allow overriding environment settings for connect and read timeouts on URL connections. In milliseconds, 0 means infinite. | |
--contentType |
|
| Content type for post data for a web request. Any suitable value can be specified. We have defines some special values for commonly used types: JSON, HTML, XML, URL_ENCODED, FORM_URL_ENCODED. | |
--continue |
|
| Continue processing even after errors are encountered for run actions. Also used for some action to ignore certain errors like not found errors on remove actions and already exists errors on add actions. | |
--cookies |
|
| Name of file to restore and persist cookies across invocations of CLI actions. | |
--copyPattern |
|
| Copy pattern for an artifact definition. | |
--credentials |
|
| Credentials name or id. | |
--data |
|
| JSON data for runFromJson. Post data for renderRequest. Action specific definition in some cases. | |
--database |
|
| Database name or reference to a ACLI configuration entry when proceeded with an @ symbol. When referencing a configuration entry, the entry should contain appropriate parameters for for defining access to the database including url and, when necessary, dbUser and dbPassword authentication parameters. | |
--dateFormat |
|
| Format string for dates in Java SimpleDateFormat. Default for output is client date format. Default for date parsing is lenient starting with client date format and then some other standard formats based on JSON date format. | |
--dateFormat2 |
|
| Alternate format string for dates in Java SimpleDateFormat. Use specific (may be ignored), but normally used for date only fields to avoid longer dateFormat based output. Some uses default to yyyy-MM-dd. | |
--dbCreateTable |
|
| Automatically create the database table before adding rows. | |
--dbJar |
|
| CLI has built-in support for Postgres and by default loads database drivers found in the CLI installation's lib/jdbc directory. Otherwise you can specify a specific file or URL reference for the database driver jar. Examples /jdbcDrivers/postgresql-42.2.19.jar or https://jdbc.postgresql.org/download/postgresql-42.2.19.jar | |
--dbPassword |
|
| Database user password. Defaults to password. | |
--dbTable |
|
| Database table name when creating or updating a database from list output. | |
--dbTableKeys |
|
| Comma separated list of column names used to access existing rows for update. Normally this defines a primary key set for the table. CLI automatically defaults unique keys specific for the action. | |
--dbUser |
|
| Database user name. Defaults to the same as the user parameter. | |
--debug |
|
| Requests detail debug output especially useful for Support. Optional for all actions. Recommend first using verbose logging for problem determination. | |
--deploymentProject |
|
| Deployment project name or id. | |
--description |
|
| Description for entity. | |
--disable |
|
| Disable an entity for those entities like plans, stages, jobs, and tasks. | |
--docker |
|
| Docker image for docker job types for Bamboo 6.4 and higher. | |
--driver |
|
| JDBC driver class or predefined value: postgresql, mysql, mssql, oracle, db2, or db2400. Normally automatically determined for many databases based on url parameter. | |
--enable |
|
| Enable an entity when updating. | |
--encoding |
|
| Character encoding (character set) for text based file content - must be an encoding supported by your Java platform. | |
--environment |
|
| Deployment environment name or id. | |
--event |
|
| Event alias or key. Alias values are: After X Build Failures, All Builds Completed, All Jobs Completed, Change of Build Status, Change of Job Status, Change of Responsibilities, Comment Added, Failed Builds And First Successful, Failed Jobs And First Successful, First Failed Job For Plan, Job Error, Job Hung, Job Queue Timeout, Job Queued Without Capable Agents, Notify After X Consecutive Failures, Notify on All Build Errors. Add-ons provide events identified by key. Example key: com.atlassian.bamboo.plugin.system.notifications:chainCompleted.failedChains. | |
--excludeDisabled |
|
| Filter out entries that are disabled. | |
--excludeEnabled |
|
| Filter out entries that are enabled. | |
--favorite |
|
| Subset to favorites. Same as favourite. | |
--favourite |
|
| Subset to favourites. Same as favorite. | |
--field |
| true | Use to set client and construct specific fields or variables using name=value syntax. The first equal sign (=) delineates the name from it's value. This provides a more convenient and expandable alternative for setting field or variables and is the recommended approach. Values are trimmed unless single quoted and single quoted strings will have single quotes removed. This provides a more convenient and expandable way to set fields as an alternative to the fields and numbered field parameters. | |
--field1 |
|
| Construct specific field or variable name. Value is specified by the value1 parameter. | |
--field2 |
|
| Construct specific field or variable name. Value is specified by the value2 parameter. | |
--fields |
|
| Deprecated. Recommend using one or more field parameters instead. Use to specify task or repository specific fields or 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. | |
--file | f |
| Path to file based content or result output. For some action it may be a directory path. Use - for standard input. Use + for getting lines from 'input' parameters (deprecated). | |
--final |
|
| Make a final task. | |
--findReplace |
| true | Successively find and replace matching text with the find and replace values specified using find:replace syntax. The first colon (:) delineates the find value from the replace value. Single quote values containing a colon and then escape embedded quotes. Legacy support for a comma separated list deprecated in 9.0 has been removed in 9.3. You must now always use multiple parameters. | |
--findReplaceRegex |
| true | Successively find and replace matching text with the find and replace values specified using find:replace syntax. The first colon (:) delineates the find value from the replace value. Single quote values containing a colon and then escape embedded quotes. The find value must be a valid regular regular expression and the replace value can contain replacement variables for capture groups like $1, $2, and so on. For some command shells, the $ may need to be escaped. Legacy support for a comma separated list deprecated in 9.0 has been removed in 9.3. You must now always use multiple parameters. | |
--group |
|
| Group name. In the case of addUser, a comma separated list of group names. | |
--header |
| true | Custom request header added to remote requests. Allows for unique headers required in some environments or needed for specific requests. Header values may be sensitive like for authentication headers, so header values are masked in debug data similar to passwords and tokens. | |
--help |
|
| Shows a help message. | |
--host |
|
| Deprecated. Not needed when using the url parameter. Database host server for SQL actions. Defaults to localhost. | |
--id |
|
| Stage or task id. | |
--input | i | true | Line of input used in place of file data for run actions. One or more input parameters are used as lines instead of using the file parameter. In some cases requiring a file parameter, it may be necessary to use a special value of + to indicate to use the input parameters instead. | |
--ipRestriction |
|
| Comma separated list of IP addresses to restrict ability to remotely trigger builds. | |
--issues |
|
| Comma separated list of Jira issue keys. | |
--job |
|
| Job key. Example: JOB1 | |
--labels |
|
| Comma or blank separated list of labels. When used for filtering, any label will satisfy the filter condition. | |
--limit |
|
| Maximum number of list entries to return. Some actions or environments may impose a smaller default limit. | |
--list |
|
| Comma separated list of entries to populate the entry replacement variable on runFromList. Single quote values containing a comma. Embedded quotes must be escaped. | |
--list2 |
|
| Comma separated list of entries to populate the entry2 replacement variable on runFromList. Single quote values containing a comma. Embedded quotes must be escaped. | |
--location |
|
| Working directory relative path to a source location for an artifact definition or a destination location for an artifact dependency. | |
--manual |
|
| Indicate that a stage be run manually. | |
--name |
|
| Name of an item or entity. | |
--number |
|
| Build number. Defaults to latest. | |
--options |
| true | Client or action specific advanced options. Use multiple times for multiple option settings or a comma separated list. | |
--outputFormat |
|
| Specify output format for a list actions. Output format determines what columns are retrieved for the list. More columns usually take longer to retrieve. | |
--outputType |
|
| CSV output from get list actions and pretty print output from get actions can optionally be converted to plain text, HTML, or json based on the value of this parameter. Get actions also support the variables output type to set replacement variables for use in a CLI run script. Valid values are: text, table, html, json, variables. | |
--password | p |
| User password for remote access. | |
--plan |
|
| Plan key containing the project key. Preferred way to reference a plan instead of the older build terminology. Example: XXX-DEF | |
--port |
|
| Deprecated. Not needed when using the url parameter. Database host port for SQL actions. Defaults to database default. | |
--pretty |
|
| Format JSON output in a more readable form. | |
--project |
|
| Project key. Example: XXX | |
--projectName |
|
| Project name. | |
--propertyFile |
|
| Property file with database parameters, field mappings, or client specific information. | |
--quiet |
|
| Limit some output messages. Optional for all actions. | |
--recipient |
|
| Recipient value for add notifications. Many recipient types need a primary recipient value. This parameter can be used instead of setting a recipient type specific field and value. | |
--recipientType |
|
| Recipient type alias or key. Alias values are: CLI, Committers - Users who have committed to the build, Email Address, Group, IM Address, Responsible Users, User, users who are responsible for the current failure, users who have committed to the build, users who have marked this build as their favourite, Watchers - Users who have marked this plan as their favourite. Add-ons provide recipient types are identified by key. Example key: com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack. | |
--reference |
|
| Reference to a replacement key value used to remember an action specific value like issue key, entity id, or similar so it can be referenced later. Each action that allows this parameter will specify that the reference parameter is valid for the action and the first entry listed for available replacement variables help text will be the value set. If you need access to a different replacement variable in your script, you will need to use setReplacementVariable action after the action to set a new replacement variable of your choosing to one of the other available replacement variables. | |
--regex |
|
| Regular expression for condition matching or list filtering. | |
--regex2 |
|
| Regular expression for secondary content matching. In some cases, filtering on a secondary field may be needed. | |
--replace |
|
| Replace existing entity on add, create, or similar actions. | |
--repository |
|
| Name of a repository. In some cases, a comma separated list of repository names. | |
--repositoryKey |
|
| Repository key that uniquely identifies the repository type. Example: com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-mercurial:hg | |
--request |
|
| Deprecated. Use the url parameter instead. URL fragment for a renderRequest. | |
--requestParameters |
|
| Additional url request parameters append to the url for the renderRequest action. Use the data parameter for request post data for POST and PUT requests. | |
--requestType |
|
| Type of a render request like GET, POST, PUT, DELETE, PATCH, HEAD. | |
--required |
|
| For an artifact definition, tells Bamboo to fail the build if artifact is not available. | |
--requirement |
|
| Plan requirement key, either a custom key or a system capability key or name like system.builder.ant.Ant or Ant. | |
--revision |
|
| Revision id or tag. | |
--schedule |
|
| Cron, daily time, or periodic schedule. A cron schedule must be valid cron expressions and defaults to 0 0 0 ? * *. A daily time is a 24 hour format (HH:mm) value. A periodic schedule is a numeric value in seconds and defaults to 180. | |
--select |
| true | Used for row selection by column value on list actions. The first colon (:) in the parameter value delineates the column name or number from a regex selection pattern. Each row's column value is used with the regex pattern to determined row inclusion in the final result. By default, row is included if the regex pattern is found in the column value. The options parameter can be set to one or more of the following to modify the default behavior: literal - to treat the regex string as a literal string, exact - to require an exact match of the value (not just a find!), negative - to reverse the condition so a match means exclude the row. Row selection takes place after all other action specific filtering conditions including the limit determination and so generally should not be used with the limit parameter. | |
--server | s |
| Server URL. Normally the same URL used when using a browser to access the server. This is a required parameter for most actions. | |
--shared |
|
| For an artifact definition, makes the artifact available for other builds. | |
--simulate |
|
| Simulate running actions. Log the action that would be taken. | |
--special |
|
| Ordered list of alternate characters for comma ( , ), colon ( : ), at ( @ ), quote ( ' ), and double quote ( " ) characters used for specialized processing of some specific parameters. | |
--sql |
|
| SQL select statement used to generate a run script. | |
--sshParaphrase |
|
| Paraphrase for SSH credentials. | |
--stage |
|
| Stage name. | |
--successfulPlans |
|
| Comma separated list of keys that represent plans that must be successful before a build is triggered. | |
--targetPassword |
|
| Target server user password. Defaults to password parameter. | |
--targetServer |
|
| Target server URL. Meaning is action specific. For addRepository, used to access Bitbucket Server information. | |
--targetUser |
|
| Target server user. Defaults to user parameter. | |
--task |
|
| Task id, name, or description. Task ids are unique, but names and descriptions are not. Name and description lookup is done by finding the first match in the ordered task list. | |
--taskKey |
|
| Task key, task type name, or alias. Use the getTaskTypeList action to list all available task keys, names, and aliases. Example key: com.atlassian.bamboo.plugins.scripttask:task.builder.script. Using task type names or CLI provided aliases for many popular task types make it a bit easier to use and maintain create plan scripts. | |
--timeout |
|
| Wait timeout in seconds. Use -1 to wait forever. | |
--toJob |
|
| To job key. | |
--token | t |
| Personal access token supported on Bamboo 6.10 and higher as an alternative to user and password for a very limited set of actions like for queuing builds and some general list related actions. | |
--toPlan |
|
| Plan key to be created. Example: XXX-DEF | |
--toProject |
|
| Project key to clone to. | |
--triggeringEnvironment |
|
| Deployment environment name or id. | |
--type |
|
| Capability type like Executable, Custom, or JDK.Also, requirement match type with values: exist (default), equal, match. Also, trigger type for addTrigger and job isolation type like agent or docker. | |
--url |
|
| Action specific setting. URL or partial URL for renderRequest. Database access URL for SQL related actions. URL for application link related actions. | |
--user | u |
| User name for remote access. | |
--userEmail |
|
| User email for user management actions. | |
--userFullName |
|
| User name for user management actions. | |
--userId |
|
| User id for user credentials and user management. | |
--userPassword |
|
| User password for user credentials and user management. | |
--value |
|
| Field value or condition value for matching. | |
--value1 |
|
| Value corresponding to the field1 parameter name. | |
--value2 |
|
| Value corresponding to the field2 parameter name. | |
--verbose | v |
| Requests verbose output to help with problem determination. Optional for all actions. | |
--version |
|
| Version name for deployment or app. | |
--wait |
|
| Wait for action to complete. |