Skip to end of metadata
Go to start of metadata

 

Available:

Bamboo 3.1 and later

 

 

On this page:

Purpose of this Module Type

A task plugin represents a unit of work during a Build. Each Job can now have multiple Tasks which run in order on a single Agent. If a Task fails the following tasks will not execute, with the exception of Final Tasks which will always execute.

Tasks are designed to be easily extensible. To get a basic Task up and running, you simply need to implement a single Java interface. However, there are optional extension points that allow you to add a configuration screen and other powerful features to your Task. 

You can find in-depth details on creating a Task on the Tasks Overview page.

If you are looking to upgrade a Builder to a Task please see the LegacyBuilderToTaskConverter Plugin Module

Example

Minimal TaskType plugin

Advanced TaskType plugin

Interface

All TaskType modules must implement the TaskType interface.

Attributes

Name

Required

Description

More Information

key

(tick)

The unique identifier of the plugin module. You refer to this key to use the resource from other contexts in your plugin, such as from the plugin Java code or JavaScript resources.

<component-import key="appProps" interface="com.atlassian.sal.api.ApplicationProperties"/>

In the example, appProps is the key for this particular module declaration, for component-import, in this case.

 

name

(tick)

The human-readable name of the plugin module. This name will be displayed when configuring Tasks

Selecting the TaskType

class

(tick)

Your TaskType class. It must implement TaskType and provide the logic for executing a Task

Executing The Task

Elements

Name

Required

Description

More Information

description

(error)

The description will be displayed to the user when selecting the TaskType to add to their Job.

Selecting the TaskType

category

(error)

Determines which categories the TaskType will be displayed in, in the TaskType picker. You can have multiple category definitions. Available categories are "builder", "test", "deployment"

Selecting the TaskType

executable

(error)

Allows you to define an Executable Type that users can add as Capabilities on their Agents.  You can then add Requirements on these Capabilities

Tasks, Requirements And Capabilities

capabilityDefaultsHelper

(error)

Allows you to automatically detect Executables that the agent/server may have and add them as Capabilities

Tasks, Requirements And Capabilities

configuration

(error)

Provide a way for users to configure your Task.

Configuring The Task

view freemarker resource

(error)

The Freemarker template to be displayed when editing your task configuration (required if configuration element supplied)

Configuring The Task

edit freemarker resource

(error)

The Freemarker template be displayed when viewing your task configuration (required if configuration element supplied)

Configuring The Task

Tutorials

Get started writing your own Tasks with the following Tutorials:

  • No labels