Skip to end of banner
Go to start of banner

How to add Source Code Checkout task in Bamboo Job using Bamboo Command Line Interface (CLI)

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 3 Next »

This article explains how to add 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 in the Bamboo job. Refer to the sample command below:

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

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_0=defaultRepository refers to  plan default repository.
  • Additionally, --disable parameter can be used to disable the task and --final cleanCheckout=true  parameter to enable force clean build.


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