Skip to end of banner
Go to start of banner

How to add labels to current build as Bamboo task using Run CLI Actions in Bamboo

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

This article explains how to add labels to the current build as Bamboo task using Run CLI actions in Bamboo.

Instructions

  1. Log in to Bamboo with Plan admin permissions.
  2. Navigate to Plan and Click Actions > Click Configure plan:
  3. Click Default Stage to add tasks in Default stage:
  4. Click Add Task to add a Bamboo CLI task in Default Job:
  5. Search Bamboo CLI in search bar and Select Bamboo CLI task:
  6. In Bamboo CLI task window, add below addLabels action to Script body add labels to current build:

    --action addLabels --plan DEMO-CLI --labels "qa-pass"  --number ${bamboo.buildNumber} --server "Bamboo_Server" --user "BambooUser_username" --password "BambooUser_Password"

    In above CLI action, 

    1. --plan value refers to plan key. 

    2. --labels value refers to labels name
    3. --number valuer refers to a bamboo variable named as ${bamboo.buildNumber} to define current build number.
    4. --server value refers to the Bamboo Server URL.
    5. --user value refers to the Bamboo username
    6. --password value refers to the Bamboo password
  7. Click Save to save the configuration. With this, the mentioned labels are added to the current build once the build run is complete.
     

  • No labels