Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article explains how to add a job in to a stage of a plan with using the Bamboo Command Line Interface (CLI)

Instructions

Use addJob action to add a job in a stage of a plan. A Bamboo job is app.

A Bamboo job is a single build unit within a plan and it controls the order in which tasks are performed. Each new plan created in Bamboo contains at least one job known as the 'Default Job'.
The parameter used in the below action:
--plan value refers to the plan key.
--description value refers to the Job descrioption.
--stage value refers to the stage name where you want to add the job.
--job value refers to the Job name.

...

Instructions

Use addJob action to add a job to a stage of a plan. 

Execute the following command to add a job to the stage of a plan:

Code Block
themeMidnight
--action addJob --plan "MKTES-TP" --description "Job to execute the test build" --stage "stage test" --job "Run job"

...

Note that sample parameter values are used in the command. You must use relevant parameter values in the command to get the required result in your instance. 

The output of the command with the sample values shows that the job, 'Run job', is now available in the 'stage test' stage as follows:

Image Added

Image Added

The parameters used with the action are:

  • --plan value refers to the plan key.
  • --description value refers to the Job description.
  • --stage value refers to the stage name where you want to add the job.
  • --job value refers to the Job name.
Info

It is recommended to test the commands command in a non-production environment before running in the productionproduction, or, run the action with --simulate parameter to verify the behaviour before deploying.