Reviews and more information

Additional support information

JVM requirements
for client

Java 1.5 and above

Please open an issue for problem reports or more complex usage or support questions

Compatibility

Unknown macro: {csv}

CLI, 2.0, 2.1, 2.2, 2.3, 2.4, Tested releases, Notes
1.1.0, , , , , , "2.1.4, 2.3.1, 2.4.0"
1.0.0, ,

Introduction

This is a command line interface for remotely accessing Bamboo using Bamboo's REST APIs. This is a working command line client that can be used directly with your installation. It also serves as an example of using Java to access Bamboo's REST API to implement Bamboo automation. The client can run on any platform with Java 1.5 or higher. The Bamboo remote APIs are currently fairly limited, but likely to improve over time.

Additional information

Unable to render {include} The included page could not be found.

Installation

  • Unzip the distribution package and put the enclosed directory in a convenient location
  • Ensure Remote API is enabled in your installation
    • You need to be an administrator
    • Accept remote API calls? should be checked in the Administration - General Configuration section

Usage

  • On a command line, cd to the directory where you installed the client
  • On Windows
    • Run bamboo
  • On Linux, Mac, or Unix
    • Run ./bamboo.sh
  • On any system supporting java
    • Run java -jar release/bamboo-cli-1.1.0.jar
  • This will show help text for the command line interface client
  • The client defaults to use a user of automation. Either add this user with all the authorities required to do the actions you want or specify a different user parameter
  • It is recommended that you open the bamboo.bat file with an editor and customize it for your environment by adding server, user, and password parameters. Follow the example in the comments and make sure you do not remove the %* at the end of the line.

Examples

  • This information is also available in the examples directory in the Atlassian Command Line Interface distribution.
  • Note: the information in this section is automatically generated, so if you have edit suggestions, add a comment. Otherwise, your edits will likely be replaced on the next update.
  • Note: the following examples assume that the bamboo.bat or bamboo.sh file has been customized for your environment as noted above.
  • From a command line, change directory (cd) to the directory where the zip was unpacked
bamboo --action getProjectList  --file "data/bamboocli/output/getProjectList.txt"  
bamboo --action getBuildList  --file "data/bamboocli/output/getBuildList.txt"  
bamboo --action getProject  --project XXX  --file "data/bamboocli/output/getProject.txt"  
bamboo --action getLatestBuildResults  --project XXX  --file "data/bamboocli/output/getLatestBuildResultsByProject.txt"  
bamboo --action getLatestBuildResults  --build XXX-DEF --file "data/bamboocli/output/getLatestBuildResults.txt"   
bamboo --action executeBuild --build XXX-DEF  
bamboo --action login > data/bamboocli/output/login.txt  
bamboo --action logout < data/bamboocli/output/login.txt  

Help text

This is the help text displayed by the default command or using --help. This gives the precise definition of parameters, however, it might be easier to just look at the examples. Note, the information in this section is automatically generated, so if you have edit suggestions, add a comment. Otherwise, your edits will be replaced on the next update.

Tips

  • Use single dash for single letter parameters - example: -v
  • Use double dash for multi-letter parameter - 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 value.
  • 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 below - example: (default: automation)
  • Some parameters are required - indicated by (...) - example: (-a|--action) <action>
  • Some parameters are optional - indicated by [...] - example: [(-f|--file) <file>]
  • Values that have more than one word must be enclosed by double quotes - example: --title "this is my title"
 

Usage:
  bamboo [--help] (-a|--action) <action> [(-f|--file) <file>] [--debug]
  [-v|--verbose] (-s|--server) <server> (-u|--user) <user> (-p|--password)
  <password> [--login <login>] [--service <service>] [-l|--loginFromStandardInput]
  [--build <build>] [--project <project>]


	Provides capability to make requests to a remote server.
	Required parameters: action, server, password.
	Optional parameters: user (likely required for your installation).
	Other required and optional parameters depending on action requested.


  [--help]
        Prints this help message.

  (-a|--action) <action>
        Requested operation to perform. Valid actions (not case sensitive) are:
        
        login - Login to remote server. Returns login token.
        	 Required parameters: password
        	 Optional parameters: user
        logout - Logout of remote server.
        getProjectList - Get a list of projects.
        	 Optional parameters: file
        getBuildList - Get a list of builds.
        	 Optional parameters: file
        getProject - Get project details.
        	 Required parameters: project
        	 Optional parameters: file
        getLatestBuildResults - Get build results for a build or project.
        	 Required parameters: build or project
        	 Optional parameters: file
        executeBuild - Run a build by key.
        	 Required parameters: build

  [(-f|--file) <file>]
        Path to file based content or result output

  [--debug]
        Requests debug output, example: stack traces.

  [-v|--verbose]
        Requests verbose output.

  (-s|--server) <server>
        Server URL.

  (-u|--user) <user>
        User name for remote login. (default: automation)

  (-p|--password) <password>
        User password for remote login.

  [--login <login>]
        Login token from previous login request.

  [--service <service>]
        Service address extension. (default: /api/rest/)

  [-l|--loginFromStandardInput]
        Get login token from standard input.

  [--build <build>]
        Build key.

  [--project <project>]
        Project key.
Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.

Release History

Issued resolved in 1.1.0

key priority summary updated asignee reporter status

Unable to locate Jira server for this macro. It may be due to Application Link configuration.

Issues resolved in 1.0.0

key priority summary updated asignee reporter status

Unable to locate Jira server for this macro. It may be due to Application Link configuration.

Open Issues

type key summary reporter assignee priority status

Unable to locate Jira server for this macro. It may be due to Application Link configuration.