Rate this page:
Bamboo 3.1 and later
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.
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.
We are maintaining example code for each of the tutorials on a Mercurial repository hosted with Bitbucket. You can clone the repository by running the following command from a terminal or command prompt.
hg clone http://bitbucket.org/atlassian/bamboo-sdk-examples
You can get help with all Bamboo APIs by asking a question on Atlassian Answers. Don't forget to tag your question with bamboo and bamboo-development.
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
In this tutorial we explain the basic elements of the Bamboo Task API, including logging and setting an applicable result state
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.
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.
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.
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: