Hi Chad,
I built a plugin a little while back that acts as a separate trigger,
but your way seems much simpler. Thoughts? Would be happy to commit
this if it seems preferable.
Brian
class ScheduledBuildTrigger
attr_accessor :build_interval
def initialize(triggered_project, opts={})
@triggered_project = triggered_project
@build_interval = opts[:build_interval] || 24.hours
@next_build_time = opts[:start_time] || calculate_next_build_time
end
def build_necessary?(reasons)
if @triggered_project.build_requested? || time_for_new_build?
@next_build_time = calculate_next_build_time
true
end
end
def calculate_next_build_time
Time.now + @build_interval
end
def time_for_new_build?
Time.now >= @next_build_time
end
end
On Tue, Jan 12, 2010 at 3:34 AM, Chad Woolley <[email protected]> wrote:
> On Mon, Jan 11, 2010 at 7:16 PM, Chad Woolley <[email protected]> wrote:
>> Has anyone made this work? I seem to remember it being discussed, but
>> don't see anything in the source...
>
> Just committed a change to support this:
>
> http://github.com/thoughtworks/cruisecontrol.rb/commit/0cd553ffd5d6ed249508954bb305ba18e9000459
>
> Lemme know if there are any problems.
>
> Also, looks like CI is working again. Good!
>
> -- Chad
> _______________________________________________
> Cruisecontrolrb-developers mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers
>
_______________________________________________
Cruisecontrolrb-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers