From thewoolleyman at gmail.com Mon Jan 11 21:16:31 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Mon, 11 Jan 2010 19:16:31 -0700 Subject: [Cruisecontrolrb-users] Force a build on a periodic schedule even if no changes? Message-ID: Setting polling_interval will only cause build if there are changes. I want to build always on a schedule (yes I have a good reason). I can't see an easy way to make this happen - it would take some hacking on SuccessfulBuildTrigger and/or PollingScheduler. Has anyone made this work? I seem to remember it being discussed, but don't see anything in the source... -- Chad From chris at omeara.com Tue Jan 12 11:17:33 2010 From: chris at omeara.com (Chris O'Meara) Date: Tue, 12 Jan 2010 08:17:33 -0800 Subject: [Cruisecontrolrb-users] Force a build on a periodic schedule even if no changes? In-Reply-To: References: Message-ID: <79d9e8511001120817sbf576bfj59aa858539a5ea3f@mail.gmail.com> Chad, I think the feature you're looking for is about 8 hours old ;) Here's the commit Brian made last night: http://github.com/thoughtworks/cruisecontrol.rb/commit/cff2f952a7465bf0068b702b41e49fcc319d2675 # Force the project to build once in every given time interval # project.triggered_by ScheduledBuildTrigger.new(project, :build_interval => 5.minutes, :start_time => 2.minutes.from_now) Cheers, Chris On Mon, Jan 11, 2010 at 6:16 PM, Chad Woolley wrote: > Setting polling_interval will only cause build if there are changes. > I want to build always on a schedule (yes I have a good reason). ?I > can't see an easy way to make this happen - it would take some hacking > on SuccessfulBuildTrigger and/or PollingScheduler. > > Has anyone made this work? ?I seem to remember it being discussed, but > don't see anything in the source... > > -- Chad > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > From thewoolleyman at gmail.com Tue Jan 12 11:50:22 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Tue, 12 Jan 2010 09:50:22 -0700 Subject: [Cruisecontrolrb-users] Force a build on a periodic schedule even if no changes? In-Reply-To: <79d9e8511001120817sbf576bfj59aa858539a5ea3f@mail.gmail.com> References: <79d9e8511001120817sbf576bfj59aa858539a5ea3f@mail.gmail.com> Message-ID: On Tue, Jan 12, 2010 at 9:17 AM, Chris O'Meara wrote: > Chad, > > I think the feature you're looking for is about 8 hours old ;) Yeah, we worked it out on the developer list. I originally cross-posted to the users list in case someone here had input... From amitkkulkarni.84 at gmail.com Fri Jan 15 06:06:52 2010 From: amitkkulkarni.84 at gmail.com (Amit Kulkarni) Date: Fri, 15 Jan 2010 16:36:52 +0530 Subject: [Cruisecontrolrb-users] Problem in configuring a project Message-ID: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> Hello all, I am new to use cruisecontrol and want some help about configuring a project. Following are the things which i have done. 1:I have added a project named testproject 2:I had configured the mail address. 3:It starts building when somebody checks in. I had written some Rspec testcases and i want to run them as soon as the build starts This is how my cruise_config.rb looks like which is under .cruise/projects/testproject Project.configure do |project| project.email_notifier.emails = ["abc at gmail.com "] project.email_notifier.from = ["testing at gmail.com "] case project.name when 'testproject' then testproject.rake_task = 'spec:controllers' else raise "Don't know what to build for project #{project.name.inspect}" end end When i run the build i am getting error as : BUILD LOG --------- Could not load project configuration: uninitialized constant testproject in ./lib/cruise_control/../../ script/../config/../vendor/rails/actionpack/lib/../../activesupport/lib/active_support/dependencies.rb:267:in `load_missing_constant' PROJECT SETTINGS ---------------- # Project-specific configuration for CruiseControl.rb Project.configure do |project| project.email_notifier.emails = ["amit at joshsoftware.com"] project.email_notifier.from = ["testing at joshsoftware.com"] case project.name when 'testproject.Quick' then testproject.rake_task = 'spec:controllers' else raise "Don't know what to build for project #{project.name.inspect}" end end -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Fri Jan 15 06:27:47 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 15 Jan 2010 04:27:47 -0700 Subject: [Cruisecontrolrb-users] Problem in configuring a project In-Reply-To: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> References: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> Message-ID: On Fri, Jan 15, 2010 at 4:06 AM, Amit Kulkarni wrote: > Project.configure do |project| > ? project.email_notifier.emails = ["abc at gmail.com"] > ? project.email_notifier.from = ["testing at gmail.com"] > ? case project.name > ??? when 'testproject' then testproject.rake_task = 'spec:controllers' > ???? else raise "Don't know what to build for project > #{project.name.inspect}" > ??? end > end > > Could not load project configuration: uninitialized constant testproject in The error is Ruby telling you have not defined 'testproject'. However, you shouldn't be doing this in cruise config anyway. Remove the case statement from cruise config, and it should just work. This is because cruise will run your default rake task by default, which in Rails should run your tests. If you want to do something other than the default rake task, create a 'cruise' rake task and cruise will run that automatically. -- Chad From amitkkulkarni.84 at gmail.com Fri Jan 15 07:13:46 2010 From: amitkkulkarni.84 at gmail.com (Amit Kulkarni) Date: Fri, 15 Jan 2010 17:43:46 +0530 Subject: [Cruisecontrolrb-users] Problem in configuring a project In-Reply-To: References: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> Message-ID: <44f45321001150413g2f0fb186r558f4c45da0ae997@mail.gmail.com> Thanks a lot.It worked. But i got some error in migrations which i will figure it out. Also i have some queries which are as follows: 1: How do i point it to my Rspec test cases? 2: By default it takes production environment?Can we change this to test environment?Or should we run the cruise control always in production environment? Since Rspec uses test environment how can we do this in cruisecontrol? 3: If the build is failed we get mail.Can we get mail if the build is passed along with all the tests? Thanks & Regards, Amit K Kulkarni On Fri, Jan 15, 2010 at 4:57 PM, Chad Woolley wrote: > On Fri, Jan 15, 2010 at 4:06 AM, Amit Kulkarni > wrote: > > Project.configure do |project| > > project.email_notifier.emails = ["abc at gmail.com"] > > project.email_notifier.from = ["testing at gmail.com"] > > case project.name > > when 'testproject' then testproject.rake_task = 'spec:controllers' > > else raise "Don't know what to build for project > > #{project.name.inspect}" > > end > > end > > > > Could not load project configuration: uninitialized constant testproject > in > > The error is Ruby telling you have not defined 'testproject'. > > However, you shouldn't be doing this in cruise config anyway. Remove > the case statement from cruise config, and it should just work. This > is because cruise will run your default rake task by default, which in > Rails should run your tests. If you want to do something other than > the default rake task, create a 'cruise' rake task and cruise will run > that automatically. > > -- Chad > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Fri Jan 15 11:15:30 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 15 Jan 2010 09:15:30 -0700 Subject: [Cruisecontrolrb-users] Problem in configuring a project In-Reply-To: <44f45321001150413g2f0fb186r558f4c45da0ae997@mail.gmail.com> References: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> <44f45321001150413g2f0fb186r558f4c45da0ae997@mail.gmail.com> Message-ID: On Fri, Jan 15, 2010 at 5:13 AM, Amit Kulkarni wrote: > Thanks a lot.It worked. > But i got some error in migrations which i will figure it out. > Also i have some queries which are as follows: > 1: How do i point it to my Rspec test cases? Your project's default rake task should run your rspec tests, if that is what you want. If that isn't happening, fix it in your project - it has nothing to do with ccrb. > 2: By default it takes production environment?Can we change this to test > environment?Or should we run the cruise control always in production > environment? > Since Rspec uses test environment how can we do this in cruisecontrol? Cruise itself runs in production environment. Your project's default rake task should run your rspec tests in the test environment. > 3: If the build is failed we get mail.Can we get mail if the build is passed > along with all the tests? You will get a mail on the first successful build after a failed build. There's really no point to getting one for every successful build, that's just noise. From amitkkulkarni.84 at gmail.com Mon Jan 18 05:44:23 2010 From: amitkkulkarni.84 at gmail.com (Amit Kulkarni) Date: Mon, 18 Jan 2010 16:14:23 +0530 Subject: [Cruisecontrolrb-users] Problem in configuring a project In-Reply-To: References: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> <44f45321001150413g2f0fb186r558f4c45da0ae997@mail.gmail.com> Message-ID: <44f45321001180244h710507aq2e7241f5b864b3eb@mail.gmail.com> Hi Chad, Everything is working fine except the Rspec thing. What i have done is as follows: Under cruisecontrol.rb/tasks/cc_build.rake i had added the following code desc "Task to do some preparations for CruiseControl" task :prepare do RAILS_ENV = 'test' end desc "Task for CruiseControl.rb, automatically picked up" task :cruise => [:prepare, "spec"] do puts "THis is a cruise" end which suggest that it should take the test environment and should execute spec test.Here it is working fine but i am not able to get whether it is executing or not.So i added a logger file i.e. puts "THis is a cruise" to check whether it is entering this task or not. But it is not. I am not getting whats going wrong. Also i tried another stunt: i wrote only CruiseControl::invoke_rake_task 'spec:all' Now when i run the command it says rake aborted. Don't know how to build task 'spec:all' Please help. Also please suggest how i can add only spec controller or spec models while running CI On Fri, Jan 15, 2010 at 9:45 PM, Chad Woolley wrote: > On Fri, Jan 15, 2010 at 5:13 AM, Amit Kulkarni > wrote: > > Thanks a lot.It worked. > > But i got some error in migrations which i will figure it out. > > Also i have some queries which are as follows: > > 1: How do i point it to my Rspec test cases? > > Your project's default rake task should run your rspec tests, if that > is what you want. If that isn't happening, fix it in your project - > it has nothing to do with ccrb. > > > 2: By default it takes production environment?Can we change this to test > > environment?Or should we run the cruise control always in production > > environment? > > Since Rspec uses test environment how can we do this in cruisecontrol? > > Cruise itself runs in production environment. Your project's default > rake task should run your rspec tests in the test environment. > > > 3: If the build is failed we get mail.Can we get mail if the build is > passed > > along with all the tests? > > You will get a mail on the first successful build after a failed > build. There's really no point to getting one for every successful > build, that's just noise. > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Mon Jan 18 13:16:38 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Mon, 18 Jan 2010 11:16:38 -0700 Subject: [Cruisecontrolrb-users] Problem in configuring a project In-Reply-To: <44f45321001180244h710507aq2e7241f5b864b3eb@mail.gmail.com> References: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> <44f45321001150413g2f0fb186r558f4c45da0ae997@mail.gmail.com> <44f45321001180244h710507aq2e7241f5b864b3eb@mail.gmail.com> Message-ID: On Mon, Jan 18, 2010 at 3:44 AM, Amit Kulkarni wrote: > Also please suggest how i can add only spec controller or spec models while > running CI Please try my previous suggestion and get your default rake task working independent of CCRB, on the same machine you are using to run CCRB. From amitkkulkarni.84 at gmail.com Tue Jan 19 07:24:58 2010 From: amitkkulkarni.84 at gmail.com (Amit Kulkarni) Date: Tue, 19 Jan 2010 17:54:58 +0530 Subject: [Cruisecontrolrb-users] Problem in configuring a project In-Reply-To: References: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> <44f45321001150413g2f0fb186r558f4c45da0ae997@mail.gmail.com> Message-ID: <44f45321001190424u7fadbe06hf8de87a352b4c165@mail.gmail.com> Hi, I tried your sugesstion but something is going wrong.I am missing something. In "./cruise/projects/testproject/cruise_config.rb " i have define custom rake task as: project.rake_task = 'spec:conrollers' Now after building the project again it is saying me that i have some pending migrations remaing but if i checked my database then those fields are already present.Is there any way to comment this line temporary so that i can check whether it is executing controller spec or not. Also second thing which i tried is that under cruisecontrol.rb/tasks/cc_build.rake i have added the line # invoke 'test' or 'default' task if Rake.application.lookup('spec:controllers') CruiseControl::invoke_rake_task 'spec:controllers' elsif Rake.application.lookup('default') CruiseControl::invoke_rake_task 'default' else raise "'cruise', test' or 'default' tasks not found. CruiseControl doesn't know what to build." end I commented the project.rake_task = 'spec:conrollers' under ./cruise/projects/testproject/cruise_config.rb ".When i build then i get an error Mysql::Error: No database selected: SHOW TABLES. Any suggestions.. On Fri, Jan 15, 2010 at 9:45 PM, Chad Woolley wrote: > On Fri, Jan 15, 2010 at 5:13 AM, Amit Kulkarni > wrote: > > Thanks a lot.It worked. > > But i got some error in migrations which i will figure it out. > > Also i have some queries which are as follows: > > 1: How do i point it to my Rspec test cases? > > Your project's default rake task should run your rspec tests, if that > is what you want. If that isn't happening, fix it in your project - > it has nothing to do with ccrb. > > > 2: By default it takes production environment?Can we change this to test > > environment?Or should we run the cruise control always in production > > environment? > > Since Rspec uses test environment how can we do this in cruisecontrol? > > Cruise itself runs in production environment. Your project's default > rake task should run your rspec tests in the test environment. > > > 3: If the build is failed we get mail.Can we get mail if the build is > passed > > along with all the tests? > > You will get a mail on the first successful build after a failed > build. There's really no point to getting one for every successful > build, that's just noise. > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amitkkulkarni.84 at gmail.com Tue Jan 19 08:10:04 2010 From: amitkkulkarni.84 at gmail.com (Amit Kulkarni) Date: Tue, 19 Jan 2010 18:40:04 +0530 Subject: [Cruisecontrolrb-users] Problem in configuring a project In-Reply-To: <44f45321001190424u7fadbe06hf8de87a352b4c165@mail.gmail.com> References: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> <44f45321001150413g2f0fb186r558f4c45da0ae997@mail.gmail.com> <44f45321001190424u7fadbe06hf8de87a352b4c165@mail.gmail.com> Message-ID: <44f45321001190510g3e8b0655s22cf1dd343ae3920@mail.gmail.com> Hi Chad, Finally got my rspec test cases run. Thanks a lot for your guidance. What i did is i followed the first point.i run the pending migrations and just build the project. It succeeded. On Tue, Jan 19, 2010 at 5:54 PM, Amit Kulkarni wrote: > Hi, > I tried your sugesstion but something is going wrong.I am missing > something. > In "./cruise/projects/testproject/cruise_config.rb " i have define custom > rake task as: > project.rake_task = 'spec:conrollers' > > Now after building the project again it is saying me that i have some > pending migrations remaing but if i checked my database then those fields > are already present.Is there any way to comment this line temporary so that > i can check whether it is executing controller spec or not. > > Also second thing which i tried is that under > cruisecontrol.rb/tasks/cc_build.rake i have added the line > # invoke 'test' or 'default' task > if Rake.application.lookup('spec:controllers') > CruiseControl::invoke_rake_task 'spec:controllers' > elsif Rake.application.lookup('default') > CruiseControl::invoke_rake_task 'default' > else > raise "'cruise', test' or 'default' tasks not found. CruiseControl > doesn't know what to build." > end > > I commented the project.rake_task = 'spec:conrollers' under > ./cruise/projects/testproject/cruise_config.rb ".When i build then i get an > error Mysql::Error: No database selected: SHOW TABLES. > Any suggestions.. > > > On Fri, Jan 15, 2010 at 9:45 PM, Chad Woolley wrote: > >> On Fri, Jan 15, 2010 at 5:13 AM, Amit Kulkarni >> wrote: >> > Thanks a lot.It worked. >> > But i got some error in migrations which i will figure it out. >> > Also i have some queries which are as follows: >> > 1: How do i point it to my Rspec test cases? >> >> Your project's default rake task should run your rspec tests, if that >> is what you want. If that isn't happening, fix it in your project - >> it has nothing to do with ccrb. >> >> > 2: By default it takes production environment?Can we change this to test >> > environment?Or should we run the cruise control always in production >> > environment? >> > Since Rspec uses test environment how can we do this in cruisecontrol? >> >> Cruise itself runs in production environment. Your project's default >> rake task should run your rspec tests in the test environment. >> >> > 3: If the build is failed we get mail.Can we get mail if the build is >> passed >> > along with all the tests? >> >> You will get a mail on the first successful build after a failed >> build. There's really no point to getting one for every successful >> build, that's just noise. >> _______________________________________________ >> Cruisecontrolrb-users mailing list >> Cruisecontrolrb-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amitkkulkarni.84 at gmail.com Tue Jan 19 09:16:52 2010 From: amitkkulkarni.84 at gmail.com (Amit Kulkarni) Date: Tue, 19 Jan 2010 19:46:52 +0530 Subject: [Cruisecontrolrb-users] Multiple project tasks Message-ID: <44f45321001190616i3a324be7g3bf9e8bfc374be87@mail.gmail.com> Hello, I have set up a project and under myproject/cruise_config.rb i had written following code: Project.configure do |project| project.email_notifier.emails = ["amit at joshsoftware.com"] project.email_notifier.from = ["testing at joshsoftware.com"] # Build the project by invoking rake task 'custom' project.rake_task = 'spec:controllers' end This works correctly as it sends me the email and also runs controller specs. Now i what i intended to do is to run model specs as well for the same project. i just added project.rake_task = 'spec:models' after controllers but when i build then it runs model spec first and does not run controller specs. Is it the case that if some of my model specs are failing then it will not execute controller specs? Please suggest. -------------- next part -------------- An HTML attachment was scrubbed... URL: From btguthrie at gmail.com Tue Jan 19 11:28:48 2010 From: btguthrie at gmail.com (Brian Guthrie) Date: Tue, 19 Jan 2010 10:28:48 -0600 Subject: [Cruisecontrolrb-users] Multiple project tasks In-Reply-To: <44f45321001190616i3a324be7g3bf9e8bfc374be87@mail.gmail.com> References: <44f45321001190616i3a324be7g3bf9e8bfc374be87@mail.gmail.com> Message-ID: Hi Amit, If you'd like CCRB to execute more than one rake task, either place them in sequence (project.rake_task = "spec:controllers spec:models") or define a custom Rake task that runs both tasks as its prerequisites (task :cruise => ["spec:controllers", "spec:models"]). If you define a task named cruise in your project then you don't need to manually set your project's Rake task. Brian On Tue, Jan 19, 2010 at 8:16 AM, Amit Kulkarni wrote: > Hello, > I have set up a project and under myproject/cruise_config.rb i had written > following code: > Project.configure do |project| > ? project.email_notifier.emails = ["amit at joshsoftware.com"] > ? project.email_notifier.from = ["testing at joshsoftware.com"] > #? Build the project by invoking rake task 'custom' > ? project.rake_task = 'spec:controllers' > end > > This works correctly as it sends me the email and also runs controller > specs. > Now i what i intended to do is to run model specs as well for the same > project. > > i just added project.rake_task = 'spec:models' after controllers but when i > build then it runs model spec first and does not run controller specs. > > Is it the case that if some of my model specs are failing then it will not > execute controller specs? > Please suggest. > > > > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > > From alexey.verkhovsky at gmail.com Tue Jan 19 11:30:51 2010 From: alexey.verkhovsky at gmail.com (Alexey Verkhovsky) Date: Tue, 19 Jan 2010 09:30:51 -0700 Subject: [Cruisecontrolrb-users] Multiple project tasks In-Reply-To: <44f45321001190616i3a324be7g3bf9e8bfc374be87@mail.gmail.com> References: <44f45321001190616i3a324be7g3bf9e8bfc374be87@mail.gmail.com> Message-ID: <3945c4271001190830t4f7c32c6n606e0f199f1ae6a2@mail.gmail.com> On Tue, Jan 19, 2010 at 7:16 AM, Amit Kulkarni wrote: > > i just added project.rake_task = 'spec:models' after controllers but when i > build then it runs model spec first and does not run controller specs. > You should understand that cruise_config.rb is a *program* (piece of Ruby code), not a config file. By adding that line you simply changed the value of project.rake_task variable from 'spec:controllers' to 'spec:models'. -- Alexey Verkhovsky http://alex-verkhovsky.blogspot.com/ CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Tue Jan 19 11:30:29 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Tue, 19 Jan 2010 09:30:29 -0700 Subject: [Cruisecontrolrb-users] Problem in configuring a project In-Reply-To: <44f45321001190424u7fadbe06hf8de87a352b4c165@mail.gmail.com> References: <44f45321001150306x66004042w5888e59bb49ac648@mail.gmail.com> <44f45321001150413g2f0fb186r558f4c45da0ae997@mail.gmail.com> <44f45321001190424u7fadbe06hf8de87a352b4c165@mail.gmail.com> Message-ID: On Tue, Jan 19, 2010 at 5:24 AM, Amit Kulkarni wrote: > Any suggestions.. CCRB will run your migrations automatically. I would suggest you start over by generating a fresh rails project and database. Create a single scaffold and spec, and make sure it runs the specs via the default task. Then add the project to cruise. You should not need to edit cruise config at all. Once you get the test project working, compare it to your actual project and see what is different. -- Chad From amitkkulkarni.84 at gmail.com Wed Jan 20 01:38:54 2010 From: amitkkulkarni.84 at gmail.com (Amit Kulkarni) Date: Wed, 20 Jan 2010 12:08:54 +0530 Subject: [Cruisecontrolrb-users] Multiple project tasks In-Reply-To: References: <44f45321001190616i3a324be7g3bf9e8bfc374be87@mail.gmail.com> Message-ID: <44f45321001192238r2d0e9f86paab9ef67ac3e437f@mail.gmail.com> Hi, I added (project.rake_task = "spec:controllers spec:models") in my project cruise_config.rb file but there is something strange is going on. 1:It invoke the spec:controllers task,some of the tests failed but it does not start the spec:models task 2:When the build is started i can see that it is executing db:test:purge and db:test:load twice.Actually it should be doing once. I am attaching the whole trace which might help you. Build was manually requested BUILD LOG --------- /root/.cruise/projects/ BrandPotion/work root$ ruby -e "require 'rubygems' rescue nil; require 'rake'; load '/home/amit/cruisecontrol-1.4.0/cruisecontrol-1.4.0/tasks/cc_build.rake'; ARGV << '--nosearch' << '--trace' << 'cc:build'; Rake.application.run; ARGV.clear" (in /root/.cruise/projects/BrandPotion/work) ** Invoke cc:build (first_time) ** Execute cc:build [CruiseControl] Invoking Rake task "spec:controllers" ** Invoke spec:controllers (first_time) ** Invoke db:test:prepare (first_time) ** Invoke db:abort_if_pending_migrations (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:abort_if_pending_migrations ** Execute db:test:prepare ** Invoke db:test:load (first_time) ** Invoke db:test:purge (first_time) ** Invoke environment ** Execute db:test:purge ** Execute db:test:load ** Invoke db:schema:load (first_time) ** Invoke environment ** Execute db:schema:load ** Execute spec:controllers FFFFFF............FF.............FFFFF..............FF........................F.FFFF............FFF.FFFFFFF.....................................................FFFFFF...............FFF............FFF.............................F.FF.........................FFFFFFFFF..FFFFF..................FF...................FFFF...FF.F.FFF.F...FFF....FFFF...FF.F.FFF.F...FFF.FF.FF.FF......FF.FF..........F...FF..FFFFF.....................FFF........F.................................................................FF.FF.....FF...FFFF...FF.F.FFF.F....FF.FFFFF.F....FFFF...FF.F.FFF.F........FFF..F.FFF.........FFFFF....FF..FFFFF.F... On Tue, Jan 19, 2010 at 9:58 PM, Brian Guthrie wrote: > Hi Amit, > > If you'd like CCRB to execute more than one rake task, either place > them in sequence (project.rake_task = "spec:controllers spec:models") > or define a custom Rake task that runs both tasks as its prerequisites > (task :cruise => ["spec:controllers", "spec:models"]). If you define a > task named cruise in your project then you don't need to manually set > your project's Rake task. > > /contests_controller_spec.rb" --options "/root/.cruise/projects/ BrandPotion/work/spec/spec.opts" failed /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/rake/spectask.rb:175:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1112:in `verbose' /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib/spec/rake/spectask.rb:151:in `define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /home/amit/cruisecontrol-1.4.0/cruisecontrol-1.4.0/tasks/cc_build.rake:5:in `invoke_rake_task' /home/amit/cruisecontrol-1.4.0/cruisecontrol-1.4.0/tasks/cc_build.rake:31 /home/amit/cruisecontrol-1.4.0/cruisecontrol-1.4.0/tasks/cc_build.rake:31:in `each' /home/amit/cruisecontrol-1.4.0/cruisecontrol-1.4.0/tasks/cc_build.rake:31 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' -e:1 dir : /root/.cruise/projects/BrandPotion/work command : echo /root/.cruise/projects/BrandPotion/work root$ ruby\ -e\ \"require\ \'rubygems\'\ rescue\ nil\;\ require\ \'rake\'\;\ load\ \'/home/amit/cruisecontrol-1.4.0/cruisecontrol-1.4.0/tasks/cc_build.rake\'\;\ ARGV\ \<\<\ \'--nosearch\'\ \<\<\ \'--trace\'\ \<\<\ \'cc:build\'\;\ Rake.application.run\;\ ARGV.clear\" >> /root/.cruise/projects/BrandPotion/build-1556.22/build.log && ruby -e "require 'rubygems' rescue nil; require 'rake'; load '/home/amit/cruisecontrol-1.4.0/cruisecontrol-1.4.0/tasks/cc_build.rake'; ARGV << '--nosearch' << '--trace' << 'cc:build'; Rake.application.run; ARGV.clear" >> /root/.cruise/projects/BrandPotion/build-1556.22/build.log 2>&1 exitstatus: 1 PROJECT SETTINGS ---------------- # Project-specific configuration for CruiseControl.rb Project.configure do |project| project.email_notifier.emails = ["amit at joshsoftware.com"] project.email_notifier.from = ["testing at joshsoftware.com"] # Build the project by invoking rake task 'custom' (project.rake_task = 'spec:controllers spec:models') # project.rake_task = 'spec:models' # Build the project by invoking shell script "build_my_app.sh". Keep in mind that when the script is invoked, # current working directory is [cruise data]/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 = 'build_my_app.sh' # Ping Subversion for new revisions every 5 minutes (default: 30 seconds) # project.scheduler.polling_interval = 5.minutes end 3:How can i define custom rake task mentioned above in my project and how can i execute that when i build the project? > Brian > > On Tue, Jan 19, 2010 at 8:16 AM, Amit Kulkarni > wrote: > > Hello, > > I have set up a project and under myproject/cruise_config.rb i had > written > > following code: > > Project.configure do |project| > > project.email_notifier.emails = ["amit at joshsoftware.com"] > > project.email_notifier.from = ["testing at joshsoftware.com"] > > # Build the project by invoking rake task 'custom' > > project.rake_task = 'spec:controllers' > > end > > > > This works correctly as it sends me the email and also runs controller > > specs. > > Now i what i intended to do is to run model specs as well for the same > > project. > > > > i just added project.rake_task = 'spec:models' after controllers but when > i > > build then it runs model spec first and does not run controller specs. > > > > Is it the case that if some of my model specs are failing then it will > not > > execute controller specs? > > Please suggest. > > > > > > > > _______________________________________________ > > Cruisecontrolrb-users mailing list > > Cruisecontrolrb-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > > > > > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From johndeewod at gmail.com Fri Jan 29 13:58:43 2010 From: johndeewod at gmail.com (John Deewod) Date: Fri, 29 Jan 2010 13:58:43 -0500 Subject: [Cruisecontrolrb-users] SVN+SSH Password Message-ID: <5eabc5041001291058h59c15b13ne85ffa3d815c8a37@mail.gmail.com> Hi all, First of all, I am (very) new to CruiseControl.rb! I got CC to work on my Linux/Ubuntu machine but every time CC detects a new build in SVN it prompts for the SSH password before continuing with the build. I tried to setup password-less SSH using OpenSSH (i.e. no passphrase SSH key) but this failed because the server where our SVN repository is located doesn't allow for password-less SSH. I was wondering if there was anyway to setup CruiseControl, through a script or hack, to save or automatically input the SSH password. Thank you! John Deewod -------------- next part -------------- An HTML attachment was scrubbed... URL: From thewoolleyman at gmail.com Fri Jan 29 14:19:19 2010 From: thewoolleyman at gmail.com (Chad Woolley) Date: Fri, 29 Jan 2010 12:19:19 -0700 Subject: [Cruisecontrolrb-users] SVN+SSH Password In-Reply-To: <5eabc5041001291058h59c15b13ne85ffa3d815c8a37@mail.gmail.com> References: <5eabc5041001291058h59c15b13ne85ffa3d815c8a37@mail.gmail.com> Message-ID: On Fri, Jan 29, 2010 at 11:58 AM, John Deewod wrote: > Hi all, > > First of all, I am (very) new to CruiseControl.rb! I got CC to work on my > Linux/Ubuntu machine but every time CC detects a new build in SVN it prompts > for the SSH password before continuing with the build. I tried to setup > password-less SSH using OpenSSH (i.e. no passphrase SSH key) but this failed > because the server where our SVN repository is located doesn't allow for > password-less SSH. I was wondering if there was anyway to setup > CruiseControl, through a script or hack, to save or automatically input the > SSH password. Thank you! No. However, I'm not sure how a remote SVN server can prevent you from using a no-passphrase SSH key. That's all client side just to allow usage of the private key, I thought... Another alternative is to use https for the SVN server - then SVN can cache the password for you (in cleartext or in your keyring).