Stuart Morrison
2011-Jul-08 11:49 UTC
[Cruisecontrolrb-users] Overriding the default trigger and adding more
Hi I have setup 3 projects all from the same repository but the point to different level of the repository. I would like to trigger a build of the top level of the repository after the detection of a change to any of the others. I think this is described in the docs as a quick build triggering a full build. I have set the following in my cruise_config.rb file if(project.name == "myProject") project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source")] project.triggered_by SuccessfulBuildTrigger.new(project, ''Testbench'') end I expect the first line to override the default trigger which is any change in myProject. The second I expect to add an additional trigger. This code does not change the default or add another trigger. (The name is correct) I have remove the condition statement to: project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source")] project.triggered_by SuccessfulBuildTrigger.new(project, ''Testbench'') but this now shows "error" below the build button in the dashboard This code is pretty much straight from the manual so can anybody show me where I am possibly going wrong here? Thanks Privacy & Confidentiality Notice ------------------------------------------------- This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. ------------------------------------------------- Wolfson Microelectronics plc Tel: +44 (0)131 272 7000 Fax: +44 (0)131 272 7001 Web: www.wolfsonmicro.com Registered in Scotland Company number SC089839 Registered office: Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK
Brian Guthrie
2011-Jul-11 14:10 UTC
[Cruisecontrolrb-users] Overriding the default trigger and adding more
Hi Stuart, Judging from the code, it should do as you suggest: the triggered_by=(triggers) method replaces the existing triggers list, and the triggered_by(*triggers) method supplements it with additional triggers. Without knowing what specific error you''re getting, it''s hard to diagnose; have you tried looking at the builder log for your projects? In principle you should be able to combine the two into a single statement, e.g.: project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source"), SuccessfulBuildTrigger.new(project, ''Testbench'')] which shouldn''t yield any different behavior, but might be worth a shot. Can you explain a little bit more about what you''re trying to do? By the "top level" of a repository, you mean the trunk or master? And you want a build of master to be triggered by a successful build of any one of three different branches? Cheers, Brian On Fri, Jul 8, 2011 at 9:49 PM, Stuart Morrison <Stuart.Morrison at wolfsonmicro.com> wrote:> Hi > > I have setup 3 projects all from the same repository but the point to different level of the repository. ?I would like to trigger a build of the top level of the repository after the detection of a change to any of the others. ?I think this is described in the docs as a quick build triggering a full build. > > I have set the following in my cruise_config.rb file > > ?if(project.name == "myProject") > ? project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source")] > ? project.triggered_by SuccessfulBuildTrigger.new(project, ''Testbench'') > end > > I expect the first line to override the default trigger which is any change in myProject. ?The second I expect to add an additional trigger. > This code does not change the default or add another trigger. ?(The name is correct) > > I have remove the condition statement to: > > ? project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source")] > ? project.triggered_by SuccessfulBuildTrigger.new(project, ''Testbench'') > > but this now shows "error" below the build button in the dashboard > > This code is pretty much straight from the manual so can anybody show me where I am possibly going wrong here? > > Thanks > > Privacy & Confidentiality Notice > ------------------------------------------------- > This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. > ------------------------------------------------- > Wolfson Microelectronics plc > Tel: +44 (0)131 272 7000 > Fax: +44 (0)131 272 7001 > Web: www.wolfsonmicro.com > > Registered in Scotland > > Company number SC089839 > > Registered office: > > Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK > > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users >
Stuart Morrison
2011-Jul-11 14:27 UTC
[Cruisecontrolrb-users] Overriding the default trigger and adding more
Hi Brian Thanks for that. I will try the one liner. I managed to fix this and it appears there was a typo in the project name field that was causing the error. I now have the triggers working perfectly. Cheers Stuart -----Original Message----- From: cruisecontrolrb-users-bounces at rubyforge.org [mailto:cruisecontrolrb-users-bounces at rubyforge.org] On Behalf Of Brian Guthrie Sent: 11 July 2011 15:10 To: cruisecontrolrb-users at rubyforge.org Subject: Re: [Cruisecontrolrb-users] Overriding the default trigger and adding more Hi Stuart, Judging from the code, it should do as you suggest: the triggered_by=(triggers) method replaces the existing triggers list, and the triggered_by(*triggers) method supplements it with additional triggers. Without knowing what specific error you''re getting, it''s hard to diagnose; have you tried looking at the builder log for your projects? In principle you should be able to combine the two into a single statement, e.g.: project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source"), SuccessfulBuildTrigger.new(project, ''Testbench'')] which shouldn''t yield any different behavior, but might be worth a shot. Can you explain a little bit more about what you''re trying to do? By the "top level" of a repository, you mean the trunk or master? And you want a build of master to be triggered by a successful build of any one of three different branches? Cheers, Brian On Fri, Jul 8, 2011 at 9:49 PM, Stuart Morrison <Stuart.Morrison at wolfsonmicro.com> wrote:> Hi > > I have setup 3 projects all from the same repository but the point to different level of the repository. ?I would like to trigger a build of the top level of the repository after the detection of a change to any of the others. ?I think this is described in the docs as a quick build triggering a full build. > > I have set the following in my cruise_config.rb file > > ?if(project.name == "myProject") > ? project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source")] > ? project.triggered_by SuccessfulBuildTrigger.new(project, ''Testbench'') > end > > I expect the first line to override the default trigger which is any change in myProject. ?The second I expect to add an additional trigger. > This code does not change the default or add another trigger. ?(The name is correct) > > I have remove the condition statement to: > > ? project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source")] > ? project.triggered_by SuccessfulBuildTrigger.new(project, ''Testbench'') > > but this now shows "error" below the build button in the dashboard > > This code is pretty much straight from the manual so can anybody show me where I am possibly going wrong here? > > Thanks > > Privacy & Confidentiality Notice > ------------------------------------------------- > This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. > ------------------------------------------------- > Wolfson Microelectronics plc > Tel: +44 (0)131 272 7000 > Fax: +44 (0)131 272 7001 > Web: www.wolfsonmicro.com > > Registered in Scotland > > Company number SC089839 > > Registered office: > > Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK > > _______________________________________________ > 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 ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. ________________________________________________________________________ Privacy & Confidentiality Notice ------------------------------------------------- This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. ------------------------------------------------- Wolfson Microelectronics plc Tel: +44 (0)131 272 7000 Fax: +44 (0)131 272 7001 Web: www.wolfsonmicro.com Registered in Scotland Company number SC089839 Registered office: Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK
Brian Guthrie
2011-Jul-11 14:35 UTC
[Cruisecontrolrb-users] Overriding the default trigger and adding more
Excellent! Glad to hear it. On Tue, Jul 12, 2011 at 12:27 AM, Stuart Morrison <Stuart.Morrison at wolfsonmicro.com> wrote:> Hi Brian > > Thanks for that. ?I will try the one liner. ?I managed to fix this and it appears there was a typo in the project name field that was causing the error. ?I now have the triggers working perfectly. > > Cheers > > Stuart > > -----Original Message----- > From: cruisecontrolrb-users-bounces at rubyforge.org [mailto:cruisecontrolrb-users-bounces at rubyforge.org] On Behalf Of Brian Guthrie > Sent: 11 July 2011 15:10 > To: cruisecontrolrb-users at rubyforge.org > Subject: Re: [Cruisecontrolrb-users] Overriding the default trigger and adding more > > Hi Stuart, > > Judging from the code, it should do as you suggest: the > triggered_by=(triggers) method replaces the existing triggers list, > and the triggered_by(*triggers) method supplements it with additional > triggers. Without knowing what specific error you''re getting, it''s > hard to diagnose; have you tried looking at the builder log for your > projects? > > In principle you should be able to combine the two into a single > statement, e.g.: > > ?project.triggered_by = [SuccessfulBuildTrigger.new(project, > "Source"), SuccessfulBuildTrigger.new(project, ''Testbench'')] > > which shouldn''t yield any different behavior, but might be worth a shot. > > Can you explain a little bit more about what you''re trying to do? By > the "top level" of a repository, you mean the trunk or master? And you > want a build of master to be triggered by a successful build of any > one of three different branches? > > Cheers, > > Brian > > On Fri, Jul 8, 2011 at 9:49 PM, Stuart Morrison > <Stuart.Morrison at wolfsonmicro.com> wrote: >> Hi >> >> I have setup 3 projects all from the same repository but the point to different level of the repository. ?I would like to trigger a build of the top level of the repository after the detection of a change to any of the others. ?I think this is described in the docs as a quick build triggering a full build. >> >> I have set the following in my cruise_config.rb file >> >> ?if(project.name == "myProject") >> ? project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source")] >> ? project.triggered_by SuccessfulBuildTrigger.new(project, ''Testbench'') >> end >> >> I expect the first line to override the default trigger which is any change in myProject. ?The second I expect to add an additional trigger. >> This code does not change the default or add another trigger. ?(The name is correct) >> >> I have remove the condition statement to: >> >> ? project.triggered_by = [SuccessfulBuildTrigger.new(project, "Source")] >> ? project.triggered_by SuccessfulBuildTrigger.new(project, ''Testbench'') >> >> but this now shows "error" below the build button in the dashboard >> >> This code is pretty much straight from the manual so can anybody show me where I am possibly going wrong here? >> >> Thanks >> >> Privacy & Confidentiality Notice >> ------------------------------------------------- >> This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. >> ------------------------------------------------- >> Wolfson Microelectronics plc >> Tel: +44 (0)131 272 7000 >> Fax: +44 (0)131 272 7001 >> Web: www.wolfsonmicro.com >> >> Registered in Scotland >> >> Company number SC089839 >> >> Registered office: >> >> Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK >> >> _______________________________________________ >> 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 > > ________________________________________________________________________ > This email has been scanned for all viruses by the MessageLabs Email > Security System. > ________________________________________________________________________ > > Privacy & Confidentiality Notice > ------------------------------------------------- > This message and any attachments contain privileged and confidential information that is intended solely for the person(s) to whom it is addressed. If you are not an intended recipient you must not: read; copy; distribute; discuss; take any action in or make any reliance upon the contents of this message; nor open or read any attachment. If you have received this message in error, please notify us as soon as possible on the following telephone number and destroy this message including any attachments. Thank you. > ------------------------------------------------- > Wolfson Microelectronics plc > Tel: +44 (0)131 272 7000 > Fax: +44 (0)131 272 7001 > Web: www.wolfsonmicro.com > > Registered in Scotland > > Company number SC089839 > > Registered office: > > Westfield House, 26 Westfield Road, Edinburgh, EH11 2QB, UK > > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users >