Pasted below is a the test ccnet.config file I've been using to mess
around with.  Feel free to copy and paste and use it yourself to
assist with testing/debugging your own personal setup.  Don't forget
to change the publisher section.

<!--
        In order for this config to work, my .bat files have to modify the c:
\Automation directory
        on my local machine here.  My .bat files simply create a log file.
They look like this:

        trigger.bat
          @ECHO OFF
          ECHO Trigger test logfile > c:\Automation\trigger\trigger.log
          END

        trigger2.bat
          @ECHO OFF
          ECHO Trigger2 test logfile > c:\Automation\trigger2\trigger2.log
          END

        trigger3.bat
          @ECHO OFF
          ECHO Trigger3 test logfile > c:\Automation\trigger3\trigger3.log
          END


        If I needed to be able to trigger using multiple machines, I could
have the
        <repositoryRoot>c:\Automation</repositoryRoot> changed to a Network
drive instead of my local
        machine.  And, have the .bat files create the .log files in that
network directory.

        Hope this helps.
-->


<!--
*****************************************************************************************
* This build is scheduled to launch @
10pm.                                             *
*****************************************************************************************
-->
        <project name="Trigger Test">
                <triggers>
                        <scheduleTrigger time="20:00" 
buildCondition="ForceBuild"
name="Scheduled"/>
                                <weekDays>
                                        <weekDay>Monday</weekDay>
                                        <weekDay>Tuesday</weekDay>
                                        <weekDay>Wednesday</weekDay>
                                        <weekDay>Thursday</weekDay>
                                        <weekDay>Friday</weekDay>
                                </weekDays>

                </triggers>

                <state type="state"/>

                <tasks>
                        <exec>
        <!-- This .bat file creates a log file and stores it @ c:\Automation
\trigger -->
                                <executable>c:\trigger.bat</executable>
                                <buildTimeoutSeconds>25</buildTimeoutSeconds>
                        </exec>

                </tasks>
                <publishers>
                        <statistics/>
                        <merge>
                                <files>
                                <!--    <file>C:\Program 
Files\CruiseControl.NET\server\Trigger Test
\Artifacts\TestResult.xml</file> -->
                                </files>
                        </merge>
                        <xmllogger logDir="C:\Program 
Files\CruiseControl.NET\server
\Trigger Test\Artifacts\buildlogs"/>
                        <email from="[email protected]" mailhost="ourmailserver"
includeDetails="TRUE">
                                <users>
                                        <user name="Gabriel Harmon" 
group="buildmanager"
address="[email protected]"/>
                                </users>
                                <groups>
                                        <group name="buildmanager" 
notification="Always"/>
                                </groups>
                        </email>

                </publishers>
        </project>

<!--
*****************************************************************************************
* In theory, this build should launch @ 10:05pm if Trigger Test
modified the            *
* c:\Automation\trigger directory with the log file, Monday through
Friday only.    *
*****************************************************************************************
-->

        <project name="Trigger Test 2">
                <triggers>
                        <scheduleTrigger time="20:05" 
buildCondition="ForceBuild"
name="Scheduled">
                                <weekDays>
                                        <weekDay>Monday</weekDay>
                                        <weekDay>Tuesday</weekDay>
                                        <weekDay>Wednesday</weekDay>
                                        <weekDay>Thursday</weekDay>
                                        <weekDay>Friday</weekDay>
                                </weekDays>
                        </scheduleTrigger>
                </triggers>

                <state type="state"/>

        <!-- This snippet will poll the c:\Automation\trigger looking for
changes compared to the last time it was polled -->
                <sourcecontrol type="filesystem">
                        <repositoryRoot>c:\Automation\trigger</repositoryRoot>
                </sourcecontrol>



                <tasks>
                        <exec>
        <!-- This .bat file creates a log file and stores it @ c:\Automation
\trigger2 -->
                                <executable>c:\trigger2.bat</executable>
                                <buildTimeoutSeconds>20</buildTimeoutSeconds>
                        </exec>

                </tasks>
                <publishers>
                        <statistics/>
                        <merge>
                                <files>
                                        <file>C:\Program 
Files\CruiseControl.NET\server\Trigger Test
2\Artifacts\TestResult.xml</file>
                                </files>
                        </merge>
                        <xmllogger logDir="C:\Program 
Files\CruiseControl.NET\server
\Trigger Test 2\Artifacts\buildlogs"/>
                        <email from="[email protected]" mailhost="ourmailserver"
includeDetails="TRUE">
                                <users>
                                        <user name="Gabriel Harmon" 
group="buildmanager"
address="[email protected]"/>
                                </users>
                                <groups>
                                        <group name="buildmanager" 
notification="Always"/>
                                </groups>
                        </email>

                </publishers>
        </project>

<!--
*****************************************************************************************
* In theory, trigger test 3 should launch @ 10:10PM only if Trigger
Test 2 modified     *
* the c:\Automation\trigger2 directory, and if it's Monday through
Friday          *
*
*
*****************************************************************************************
-->

        <project name="Trigger Test 3">

        <triggers>
          <scheduleTrigger time="20:10" buildCondition="ForceBuild"
name="Scheduled">
            <weekDays>
              <weekDay>Monday</weekDay>
              <weekDay>Tuesday</weekDay>
              <weekDay>Wednesday</weekDay>
              <weekDay>Thursday</weekDay>
              <weekDay>Friday</weekDay>
            </weekDays>
          </scheduleTrigger>
        </triggers>

                <state type="state"/>

        <!-- This snippet of code will poll the c:\Automation\trigger2
looking for changes compared to the last time it was polled -->
                <sourcecontrol type="filesystem">
                        <repositoryRoot>c:\Automation</repositoryRoot>
                </sourcecontrol>


                <tasks>

                        <exec>
                                <executable>c:\trigger3.bat</executable>
                                <buildTimeoutSeconds>10</buildTimeoutSeconds>
                        </exec>

                </tasks>
                <publishers>
                        <statistics/>
                        <merge>
                                <files>
                                        <file>C:\Program 
Files\CruiseControl.NET\server\Trigger Test
3\Artifacts\TestResult.xml</file>
                                </files>
                        </merge>
                        <xmllogger logDir="C:\Program 
Files\CruiseControl.NET\server
\Trigger Test 3\Artifacts\buildlogs"/>
                        <email from="[email protected]" mailhost="ourmailserver"
includeDetails="TRUE">
                                <users>
                                        <user name="Gabriel Harmon" 
group="buildmanager"
address="[email protected]"/>
                                </users>
                                <groups>
                                        <group name="buildmanager" 
notification="Always"/>
                                </groups>
                        </email>

                </publishers>
        </project>


On Aug 5, 11:35 pm, GHarmonDDVA <[email protected]>
wrote:
> Did some more digging on this site and found the following gem which
> basically states, it's not possible without using the filesystem
> source control:
>
> "Unfortunately the multi-trigger doesn't do what you need when you use
> it with a project trigger because of how the project trigger works...
> The project trigger resets itself on each check rather than stayings
> set until integration is complete. This means that a multi-trigger
> with multiple project triggers is unlikely ever to end up with all of
> the triggers firing. I have some patches but i havent had a chance to
> submit them as they're part of a bigger change.
>
> On Sep 16, 4:23 pm, Daniel Hommel <[email protected]> wrote:"
>
> On Aug 5, 10:38 pm, GHarmonDDVA <[email protected]>
> wrote:
>
> > So, I changed the operator to "And" .. it does not force a build now.
> > If I leave it set to "Or", it will fire a build if either one of the
> > conditions is met.  How do I get it to fire only if both conditions
> > are true?
>
> > On Aug 4, 11:07 pm, GHarmonDDVA <[email protected]>
> > wrote:
>
> > > Thank you Craig.  Apparently I completely missed the part where
> > > <multiTrigger> has to be inside <triggers> ...... I was putting multi
> > > then triggers .. It is working perfectly.
>
> > > On Aug 4, 10:35 pm, "Craig & Sammi Sutherland"
>
> > > <[email protected]> wrote:
> > > > Try:
> > > >     <triggers>
> > > >       <multiTrigger operator="Or">
> > > >         <triggers>
> > > >           <projectTrigger project="QAREL Test Suite">
> > > >             <triggerStatus>Success</triggerStatus>
> > > >           </projectTrigger>
> > > >           <scheduleTrigger time="20:00" buildCondition="ForceBuild"
> > > > name="Scheduled">
> > > >             <weekDays>
> > > >               <weekDay>Monday</weekDay>
> > > >               <weekDay>Tuesday</weekDay>
> > > >               <weekDay>Wednesday</weekDay>
> > > >               <weekDay>Thursday</weekDay>
> > > >               <weekDay>Friday</weekDay>
> > > >             </weekDays>
> > > >           </scheduleTrigger>
> > > >         </triggers>
> > > >       </multiTrigger>
> > > >     </triggers>
>
> > > > Craig
>
> > > > -----Original Message-----
> > > > From: [email protected] [mailto:[email protected]] 
> > > > On
>
> > > > Behalf Of GHarmonDDVA
> > > > Sent: Wednesday, 5 August 2009 11:27 a.m.
> > > > To: ccnet-user
> > > > Subject: [ccnet-user] Multitrigger configuration problem
>
> > > >         <project name="DBDeploy">
> > > >                 <triggers>
> > > >                         <projectTrigger project="QAREL Test Suite">
> > > >                         <triggerStatus>Success</triggerStatus>
> > > >                         </projectTrigger>
>
> > > > **** AND CHECK TO SEE IF IT IS A WEEKDAY ****
>
> > > >                         <scheduleTrigger time="20:00"
> > > > buildCondition="ForceBuild"
> > > > name="Scheduled">
> > > >                                   <weekDays>
> > > >                                   <weekDay>Monday</weekDay>
> > > >                                   <weekDay>Tuesday</weekDay>
> > > >                                   <weekDay>Wednesday</weekDay>
> > > >                                   <weekDay>Thursday</weekDay>
> > > >                                   <weekDay>Friday</weekDay>
> > > >                                  </weekDays>
> > > >                         </scheduleTrigger>
> > > >                 </triggers>
>
> > > > Now, I can set it up to trigger off either the schedule or the
> > > > project, but, I can't get it to work with both.  When I attempt to use
> > > > multiTrigger, I always get an "unused node" error.  How do I convert
> > > > the above to fit the <multiTrigger> format?
>
> > > > Using v1.4 CCTray and Server.

Reply via email to