/
How to add an environment to deployment project using Bamboo CLI

How to add an environment to deployment project using Bamboo CLI

This article explains how to add an environment to a deployment project using Bamboo Command Line Interface (CLI)Bamboo allows you to create multiple deployment environments and also allows you to manage the Environment details.

Instructions

It is required to know the deployment project ID to which the environment is to be added. The deployment project ID is captured from the URL and is the highlighted part in red as shown:

Use the addEnvironment action to add the environment to a deployment project in Bamboo. 

  1. Execute the following action to perform this function:

    --action addEnvironment --deploymentProject "Deployment for mknew test001" --name "DEV1" --description "Environment description Development"
    
    

    Or, mention the deployment project ID for the deploymentProject parameter using the following action:

    --action addEnvironment --deploymentProject "90701828" --name "TEST1" --description "Testing Environment"
  2. Add the Environment, TEST1, as shown:


The parameters used with the actions are:

  • --deploymentProject value refers to the name or ID of the deployment project.
  • --description value refers to the environment description.
  • --name value refers to the name of the environment.

It is recommended to test the actions in a non-production environment before running in productionor run the actions with --simulate parameter to verify the behavior before deploying.

Related content