Skip to end of banner
Go to start of banner

How to add Bamboo CLI task in a Bamboo job with Run CLI Actions in Bamboo

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

This article explains how to add Bamboo CLI task in a Bamboo job with Bamboo Command Line Interface (CLI).

Instructions

Use the addTask action to create Bamboo CLI action tasks in the Bamboo job. Refer to the following sample command:

--action addTask --plan DEMO-PLAN  --job JOB1  --description "Build Report" --taskKey org.swift.bamboo.acli:bamboo --field scriptLocation=INLINE --field scriptBody="--action getBuildReportList --project DEMO --server "Bamboo_Server" --user "Bamboo_Username" --password "Bamboo_Password" "

In the above action:

  • --plan value refers to the Bamboo plan key.
  • --job value refers to the Bamboo job key.
  • --taskKey value refers to the Bamboo task type.
  • --description value refers to the task description.
  • --field parameter refers to a specific Bamboo CLI task configuration.
    • --field  scriptLocation=INLINE refers to the inline action type.
    • --field scriptBody="--action getBuildReportList --project DEMO --server "Bamboo_Server" --user "Bamboo_Username" --password "Bamboo_Password" "  refers to the Bamboo CLI action to be added as a task in the Bamboo job.
  • Additionally, --disable parameter can be used to disable the task, and --final parameter can be used to script the task as a final task.
  • Make sure that Run CLI Actions in Bamboo app installed in Bamboo.
  • It is recommended to test it in a non-production environment or run the action with --simulate parameter to verify the behavior before deploying.
  • No labels