Bamboo Tasks API
REST APIs

Bamboo Tasks API

Available:

Bamboo 3.1 and later

What is a Task?

A Task is an operation that is run sequentially within a Job on a Bamboo working directory. Once a Task is defined in the Bamboo system, it can then be specified in Jobs by a Plan administrator. A Job can be configured to execute a number of Tasks, on the same working directory. For example, before executing a Maven goal, the user could substitute specific files within the working directory, substitute version numbers or execute a Script.

Developing custom Tasks

Tasks are designed to be easy to implement and extend. The basic unit of a Task is a TaskType which is a simple interface that takes in some contextual information, such as a map of configuration strings, logging mechanisms and file system locations, executes an action then returns a result object containing a result state (success, failed, error, etc) and a map of result data. You can learn more about the API in our Tasks Overview and by reading the other materials provided below.

For an overview about how Tasks fit into Bamboo see the Bamboo Plugin Guide.

Getting help

You can get help with all Bamboo APIs by asking a question on Atlassian Community. Don't forget to tag your question with bamboo and bamboo-development.

Resources

Tasks Overview

In this overview of the Task APIs we highlight how Tasks are executed, defined, configured and how to use optional APIs such as Executables, Test Parsing, Logging, Capabilities, Requirements and design considerations for running Tasks on Remote Agents

Introduction to writing Tasks

In this tutorial we explain the basic elements of the Bamboo Task API, including logging and setting an applicable result state

Writing a Task with a User Interface

The Bamboo "Hello World" plugin is the example Bamboo plugin that ships with the Atlassian Plugin SDK default project. In this tutorial we break down the plugin and explain how to build a User Interface and add validation.

Executing external Processes using ProcessService

ProcessService http://docs.atlassian.com/atlassian-bamboo/latest/com/atlassian/bamboo/process/ProcessService.html is a bean which can be injected into a TaskType to execute external processes.

Test Collection and Reporting

Using the TestCollationService APIs its possible to write your own Tasks that parse files or logs that contain test results and have the results display in Bamboo.

Providing an icon for your Bamboo Task

In Bamboo 3.4 and above, it is possible to give your Task plugin an easily identifiable icon when a user browses for Tasks.

In Bamboo 5.2 and above, it is possible to add a link to help documentation for your task, which displays in the top right corner of the task edit window.

Rate this page: