Skip to content

Instantly share code, notes, and snippets.

@gavinheavyside
Created May 26, 2010 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gavinheavyside/415033 to your computer and use it in GitHub Desktop.
Save gavinheavyside/415033 to your computer and use it in GitHub Desktop.
A cruisecontrol.rb notifier for edash
# A cruisecontrol.rb plugin to send notifications to edash (http://github.com/edendevelopment/edash)
# - put it in $CRUISE_DATA_ROOT/builder_plugins and restart cruisecontrol.rb
#
# notify building status to edash
#
# You might need to change the host and port in the post line
require 'builder_error'
require 'rest_client'
class EdashNotifier < BuilderPlugin
def build_started(build)
set_status :building
end
def build_finished(build)
set_status (build.failed? ? :fail : :pass)
end
private
def set_status(status)
RestClient.post('http://localhost:9292/build', :project => project.name, :status => status.to_s, :author => project.source_control.latest_revision.author)
end
end
Project.plugin :edash_notifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment