Skip to end of banner
Go to start of banner

How to add environment task to a deployment project using Bamboo 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 9 Current »

This article explains how to add an environment task to a deployment project using Bamboo Command Line Interface (CLI).

Instructions

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

Run the following CLI action:

--action addEnvironmentTask --deploymentProject "Deployment for test001"  --environment "TEST1" --taskKey ARTIFACT_DOWNLOAD --name "hello world artifact" --description "Download release contents" --field "sourcePlanKey=MKNEW-JAV" --field "artifactId_0=90144776"

The output of the CLI action is as follows:

Task 'Artifact download' with id 3 added to environment 'TEST1' in deployment project 'Deployment for test001'. Task description is 'Download release contents'

Screenshots

Before adding the task to the environment:

After adding the task to the environment:

The parameters used with the action are:

  • --deploymentProject value refers to the name or ID of the Deployment Project.
  • --environment  value refers to the environment name.
  • --taskKey value refers to the task types.
  • --description value refers to the environment description.
  • --field value refers to set client and construct specific fields.

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

  • No labels