Matt Wynne
2008-Oct-10 17:55 UTC
[Cruisecontrolrb-users] Configuring a project with no trigger
I''d like to have a build project for deploying our app to production, but obviously I don''t want it to be triggered automatically. I tried setting the project.scheduler.polling_interval to something massive, but it complained it had to be max 24 hours. I tried setting the project.schduler to nil but it didn''t seem to like it. Can this be done? cheers, Matt
Alexey Verkhovsky
2008-Oct-10 19:18 UTC
[Cruisecontrolrb-users] Configuring a project with no trigger
Try putting project.triggered_by = [] in cruise_config.rb. That should do the trick. Also, if you look through project.rb, you''ll notice that decision to trigger the build is made Project#build_necessary?. So you can even just override that method itself in cruise_config.rb: class << project def build_necessary? false end end Note, however, that unlike project.triggered_by= (which is part of a documented configuration API surface), the freestyle hacking of internals is only guaranteed to work until you try to upgrade your CC.rb version to the next release. So, beware. -- Alex