Versions Compared

Key

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

This article explains how how to add Source Code a source code Checkout task in a Bamboo job , by using Bamboo Command Line Interface (CLI).

Instructions

Use the addTask action to create Source Code Checkout the task a source code Checkout task in the Bamboo job. Refer Refer to the following sample command below:

Code Block
themeMidnight
--action addTask --plan DEMO-NEW  --job JOB1 --taskKey CHECKOUT --description "get source" --field selectedRepository_0=defaultRepository

In 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 source code checkout configuration. --field  selectedRepository Value selectedRepository_0=defaultRepository refers to  to the plan's default repository.
  • Additionally, --disable parameter can be used to disable the task, and --final cleanCheckout=true  true parameter can be used to enable force a clean build.
Info

It is recommended to test it in a non-production environment, or run the action with --simulate parameter to verify the behavior before deploying.

...