srushti / goldberg

Goldberg is a lightweight CI server written in Ruby which worries about Bundler & RVM so that you don't have to.
Other
242 stars 29 forks source link

Emails on build failure and fixed not being sent #108

Open Unboxed-CI opened 13 years ago

Unboxed-CI commented 13 years ago

Running the app under passenger and ruby 1.8.7, no emails are being sent. Just curious to know if this could be because of the ruby version. I've seen no errors in the build.log.

Debug seems to show the config on Project returns empty values when after_build_runner is called: <BuildPostProcessor:0x103276268 @configuration=<Project::Configuration:0x1033985d8 @environment_variables={}, @command=nil, @build_success_callbacks=[], @rake_task=:default, @ruby="1.8.7", @build_failure_callbacks=[], @group="default", @frequency=20, @nice=0, @timeout=600 seconds, @build_completion_callbacks=[], @build_fixed_callbacks=[]>>

Thanks,

Jolyon

aakashd commented 13 years ago

@Unboxed-CI, can you share the config file? Based on the data you have shared, it seems that the ProjectConfig does not have any callbacks registered.

jpawlyn commented 13 years ago

Hi, thanks for the response. The config file is as follows:

#Goldberg configuration
Project.configure do |config|
  # config.ruby = '1.9.2'     # Your server needs to have rvm installed for this setting to be considered
  config.environment_variables = {"RAILS_ENV" => "test", "SPEC_OPTS" => "-t~js"}
  config.command = 'rake ci'   # To be used if your CI build runs something other than the default rake.

  config.on_build_failure do |build, notification|
    notification.from('goldberg@unboxedconsulting.com').to('me@unboxedconsulting.com').with_subject("build failuire for #{build.project.name} #{build.status}").send
  end

  config.on_build_fixed do |build, notification|
    notification.from('goldberg@unboxedconsulting.com').to('me@unboxedconsulting.com').with_subject("build fixed for #{build.project.name} #{build.status}").send
  end
end

Thanks,

Jolyon