Versions Compared

Key

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

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

Instructions

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

...

In the above action:

  • --plan value refers to a 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 Bitbucket CLI task configuration.
    • --field  scriptLocation=INLINE refers to the inline action type.
    • --field scriptBody="--action mergePullRequest --project "DEMO" --repository "cli-repo" --pullRequest "pr2" --server "Bitbucket_Server" --user "Bitbucket_Username" --password "Bitbucket_Password" " refers to the Bitbucket 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.
Info
  • 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.

...