[Cruisecontrolrb-users] Scheduling a nightly build - config options

48 views
Skip to first unread message

Krishnan Kannan

unread,
Jun 24, 2010, 2:24:54 PM6/24/10
to Cruisecont...@rubyforge.org
Hello,

I downloaded the latest cruisecontrol.rb from github and tried configuring a schedule for building every 24 hours.  

Below is my project specific cruise_config.rb.  What's happening is, cruisecontrol.rb is not honoring the polling_interval of 1.day and it keeps building continuously (true to it's nautre of continuous buids), which I assume it's using the default polling interval of 5 minutes.  

Am I missing any other configuration options to make it build only on the specified time period?

Also, another question is how does the project.triggered_by ScheduledBuildTrigger work? Can I combine this with the polling_interval of 1.day and always_build or are these mutually exclusive options?

Thanks,
Kannan


cruise_config.rb at project level
--------------------------------------------

# Project-specific configuration for CruiseControl.rb

Project.configure do |project|

  # Send email notifications about broken and fixed builds to ema...@your.site, ema...@your.site (default: send to nobody)
  project.email_notifier.emails = ['krishna...@mydomain.com']

  # Set email 'from' field to jo...@doe.com:
  project.email_notifier.from = 'cruisec...@mydomain.com'

  # Build the project by invoking rake task 'custom'
  #project.rake_task = 'all_unit_tests'

  # Build the project by invoking shell script "build_my_app.sh". Keep in mind that when the script is invoked,
  # current working directory is <em>[cruise&nbsp;data]</em>/projects/your_project/work, so if you do not keep build_my_app.sh
  # in version control, it should be '../build_my_app.sh' instead
  project.build_command = '/var/ci/cruise/config/build_acceptance_tests.sh'

  # Force the project always build once every day and always build whether there are source control changes or not
  project.scheduler.polling_interval = 1.day
  project.scheduler.always_build = true

  #
  # Force the project to check for source control changes every given time interval, but NOT build if there are no changes
  # project.triggered_by ScheduledBuildTrigger.new(project, :build_interval => 5.minutes, :start_time => 2.minutes.from_now)

end

Jarl Friis

unread,
Jun 29, 2010, 3:52:33 AM6/29/10
to cruisecont...@rubyforge.org
Krishnan Kannan <kxka...@gmail.com> writes:

> 1. (*) text/plain ( ) text/html

>
> Hello,
>
> I downloaded the latest cruisecontrol.rb from github and tried configuring a schedule for building every 24 hours.
>
> Below is my project specific cruise_config.rb. What's happening is, cruisecontrol.rb is not honoring the polling_interval of 1.day and it keeps building continuously (true to it's nautre of continuous buids), which I assume it's using the default polling interval of 5 minutes.
>
> Am I missing any other configuration options to make it build only
> on the specified time period?

>
> Also, another question is how does the project.triggered_by
> ScheduledBuildTrigger work?

I think you do like this:

project.triggered_by ScheduledBuildTrigger.new(project, :build_interval => 24.hours, :start_time => Time.now)

You can now use default polling I believe.

I also found this, discussing the difference among the approaches:
http://old.nabble.com/Force-a-build-on-a-periodic-schedule-even-if-no-changes--td27121400.html

Jarl

_______________________________________________
Cruisecontrolrb-users mailing list
Cruisecont...@rubyforge.org
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users

Reply all
Reply to author
Forward
0 new messages