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

Version 1 Next »

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

Instructions

  1. Login 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 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 Bamboo Server url.
    5. --user value refers to Bamboo username
    6. --password value refers to Bamboo password
  7. Click Save to Save the Configuration and with this when build run completes mentioned labels will be added to current build:
     

  • No labels