.
CLI Notifications
Description
Bamboo notification support is an opportunity to do something after a build has completed. The Bamboo notification framework allows built-in and customized notifications to be triggered after the completion of the build. Bamboo also provides a number of built-in conditions that determine when notifications can be triggered. We are taking advantage of the notification protocol to allow CLI actions to be used triggered by the notification framework. While many CLI can be considered traditional notifications (like Hipchat sendMessage), the support provided is open ended and allows for any CLI action to run. This enables some unique scenarios that solves some long requested use cases involving doing things after a build has completed. With CLI conditional running of actions, even more advanced conditioning can be done to do things like running some action if a build was successful and different actions if a build was not successful.
Use Cases
CLI notifications enable a number of diverse use cases:
Traditional Notifications
- Slack - send message or notification
- Jira - add comment
- Confluence - add comment
- Bamboo - add comment
Advanced Use Cases
- Jira - create issue
- Bamboo - add labels
- Bamboo - queue build
- To do additional tear-down activities based on build result
- Retry build conditioned on first failure or similar
Features
- Configure via UI or Bamboo CLI
- Use Bamboo variables to centralize configuration
- Use CLI conditioning to find tune exactly when something should be done
UI Configuration
hipchat -a sendMessage --room Bob --message "Failed: ${bamboo.buildResultKey}" --token ${bamboo.chatToken} --server https://chat.examplegear.com
-a runIf --options negative -p *** --regex (?i)((SUCCESS)|([2-9]\d*)) --value ${bamboo_buildState}-${bamboo_restartCount} -i "-a queueBuild --build ${bamboo.buildResultKey}"
Recommend using Bamboo 6.3 and higher for nested variable support which makes configuration easier.
Pseudo Bamboo Variables
Some new pseudo Bamboo variables have been defined to provide some additional variables that can be used in CLI Notifications.
Log a request with our support team.
Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.