- Is a small discrete unit of work, such as source code checkout, executing a Maven goal, running a script, or parsing test results.
- Is run sequentially within a job on a Bamboo working directory.
Tasks may make use of an executable if required. Tasks are configured within the scope of a job. 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, check out source repositories, or execute a script.
Final tasks for a job are always executed, even if previous tasks in the job failed.
Create a task for a job
When creating a new job or configuring an existing one, you need to specify the tasks that will execute the job's builds. You must specify an executable for each task. If you specify an Ant, Grails or Maven executable, you will also need to choose a JDK.
When creating a new plan, you can configure the tasks for the plan's default job.
To create a task for a job:
- Navigate to the tasks configuration for a job. Do this by:
- Click Add task.
- Select your task type.
- Complete the following fields that are common to all task types:
Enter a description of the task, for display in Bamboo.
Disable this task
Check, or clear, to selectively run this task.
Make task run only when a certain condition is met.
You can find other conditions on Atlassian Marketplace or implement your own.
- Complete the remaining field, which are specific for individual task types. See the following pages for further details:
- Click Save.
Screenshot: Specifying a task for a job — Task types
Order the tasks in a job
Tasks can be designated as build tasks or final tasks in a job:
- Build Tasks will run sequentially in the order specified in the job. If a Build Task fails, all subsequent tests will not be executed.
- Final Tasks will run sequentially, once the build tasks have completed. Final Tasks will always be executed, regardless of whether any Build Tasks or other Final Tasks fail. Final Tasks will be executed even if you stopped the build manually.
To order the tasks for a job:
- Navigate to the tasks for the desired job.
- Drag and drop the tasks into the desired order in the table on the left. If you want to change a Build Task to a Final Task or vice versa, drag and drop it under the desired header in the table. Your changes will be saved immediately.
Screenshot: Existing Task — Command Task
- Adding new executables — At least one executable is configured automatically after installing Bamboo. You can add more executables of different types as described in Configuring a new executable.
- Adding new JDKs — At least one JDK is configured automatically after installing Bamboo. You can add more JDKs as described in Defining a new JDK capability.
About the 'Compatibility Task' — The 'Compatibility Task' is created by Bamboo when upgrading from Bamboo 3.0 or earlier and Bamboo cannot match a builder to a task. This may occur if you are using a builder enabled by a custom plugin.