Versions Compared

Key

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

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

Instructions

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

  • Execute the following action to add the environment task to the deployment project.

    Code Block
    themeMidnight
    --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:

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


    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. 

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