Using stages in a plan

Stages group (or map) jobs to individual steps within a plan's build process. For example, you may have an overall build process plan that comprises a compilation step, followed by several test steps, followed by a deployment step. You can create separate Bamboo stages to represent each of these steps.

A stage:

  • By default has a single job but can be used to group multiple jobs.
  • Processes its jobs in parallel, on multiple agents (where available).
  • Must successfully complete all its jobs before the next stage in the plan can be processed.
  • May produce artifacts that can be made available for use by a subsequent stage.

Each new plan created in Bamboo contains at least one stage (for the default job) and is known as the Default stage. Stages can only be configured by Bamboo administrators.

On this page:

Types of stages in Bamboo

Normal stage

Normal stage must successfully complete all its jobs before the next stage in the plan can be run. If a normal stage is not run successfully, the following normal stage can't be run.

Manual stage

A user has to trigger this type of stage manually to run it. 

Learn more...

Any stage in a plan can be configured to be a manual stage. If you run a plan with manual stages, Bamboo will pause the execution of the plan every time it reaches a manual stage. The plan build will only continue once a user has manually triggered the stage.

  • A manual stage can only be triggered if the previous stage has completed successfully.
  • Manual stages must be be executed in the order that they are configured in the plan. You cannot skip a manual stage.
  • Manual stages will be displayed in the Plan navigator with either this icon (not due to be triggered) or this icon (pending execution).
  • You need Build permission on the plan to run a manual stage.
  • Not even final stages will be run after an untriggered manual stage.
  • A manual stage can also be a final stage. In this case, the build will stop at the manual stage and wait for a user to execute it manually. You can start this particular final-manual stage whether a build is successful or not. 

Final stage

Final stage is run regardless whether previously run stages were successful or not.

Learn more...

Final stages can be useful if you want to run cleanups or aggregate results regardless whether a build succeeds or not. Any stage in a plan can be configured to be a final stage

A final stage can also be a manual one. In this case, the build will stop at the manual stage and wait for a user to execute it manually. You can start this particular final-manual stage whether a build is successful or not. 

If a final stage follows a manual stage, the final stage will not run until the manual stage is run. If the build fails and the manual stage cannot be run, you can't run the final stage.




Find, create, edit, and delete a stage

Navigate to the stages for a plan...
  1. From the Bamboo header select Build > All build plans.
  2. Select the name of the plan you want to edit.
  3. Select Actions > Configure plan.
  4. Select the Stages tab.
Create a stage...
  1. Go to the stages for your plan.
  2. Select Create stage.
  3. Complete the form and select Create.
  4. (optional) You may want to do one or more of the following with your new stage:
    • Order your new stage in the list of stages, by dragging and dropping it.
    • Add a new job to your stage.
    • Move a job from another stage to your new stage by dragging and dropping the job.
You may break artifact dependencies by moving stages, or by moving jobs between stages. Bamboo will warn you if a dependency will be broken by moving a stage or a job.
Edit a stage...
  1. Navigate to the stages for the plan, as described above.
  2. Edit the stage as required:
    • To edit the name and description of the stage or configure whether it is a manual stage, select the cogwheel icon () and select Configure stage.
    • To move the stage, drag and drop the stage to the desired place in the plan.
You may break artifact dependencies by moving stages. Bamboo will warn you if a dependency will be broken by moving a stage.
Delete a stage...
  • Deleting a stage will delete all job configurations, artifacts, logs, and results related to the stage. These cannot be recovered after the stage is deleted.
  • You may break artifact dependencies by deleting a stage.
  1. Go to the stages for the plan, as described above.
  2. Select the cogwheel icon () for the relevant stage and select Delete stage.
  3. Select Confirm to delete the stage. Note that a deleted stage cannot be recovered.




Last modified on Aug 10, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.