This page last changed on Mar 09, 2009 by bmccoy.

Description

The Bamboo Event Listener module allows you to register an event listener against any event that is currently thrown in Bamboo and perform arbitrary operations. Some examples include sending off notifications or terminating a build when it hung.

Interface

All event listener modules implement the com.atlassian.event.EventListener interface or alternatively the com.atlassian.bamboo.event.HibernateEventListener which will automatically provide you with a hibernate session to access to the database (required for writing notification plugins).

Sample Module Descriptor Element

<bambooEventListener key="buildHungNotificationListener" name="Build Hung Notification Listener"
               class="com.atlassian.bamboo.notification.buildhung.BuildHungNotificationListener">
    <description>Listens for if a build has hung.</description>
</bambooEventListener>

Available Events to listen to

There is a number of events currently available in Bamboo. Each event contains information regarding the context in which it was thrown.

Event Notes
AgentConfigurationUpdatedEvent Occurs when a specific agent is updated (e.g the agent has been create or disabled)
AllAgentsUpdatedEvent Occurs if there is an update that will effect all agents e.g. disabling/enabling all agents or updating capability sets
BambooErrorEvent These are any errors generated by Bamboo (not your build). These are the same errors which are displayed as System Errors in the Bamboo UI. This may include failing checkouts, agents going offline etc.
BuildCommentedEvent  
BuildCompletedEvent Thrown after build completed and results saved to the database, not necessarily before or after any CustomBuildCompleteActions are performed
BuildConfigurationUpdatedEvent  
BuildCreatedEvent  
BuildDeletedEvent  
BuildQueuedEvent  
BuildHungEvent Thrown when Bamboo's build monitoring detects the build has met the configured build hanging criteria
BuildRequirementUpdatedEvent  
BuildResultDeletedEvent  
BuildResultSummaryUpdatedEvent Currently the only way to edit a build summary is editing the JIRA issues associated with the build.
BuildsMovedEvent Thrown when moving Build Plan between projects.
BuildTriggeredEvent Thrown after a bamboo has detected that the plan needs building, before the build is placed on the queue
ChangeDetectionRequiredEvent  
ElasticConfigUpdatedEvent Thrown when a user updates the Elastic Bamboo Configuration
EmailEvent Contain an email to be sent
IMEvent Contain an instant message to be sent
InitialBuildRequiredEvent Thrown if bamboo detects that an initial clean build is required for a plan (usually after plan creation or importing data)
PostBuildCompletedEvent Thrown after the build is saved AND the build process has been completely cleaned up

Most of these events either extend a BuildEvent (build key available) or a BuildResultEvent (build key and build number available).

Document generated by Confluence on Mar 09, 2009 17:07