开发者

Why isn't my CruiseControl.net project trigger working?

I have a project in CruiseControl.net that I am trying to create a schedule for it to run at a certain time most days.

The problem is that it doesn't work. The scheduled time does not update in the CCnet dashboard it seems until i remove the project trigger. Then it works..but it's not building a project so therefore useless.

In my CCnet.config:

  <project>
    <name>MyProject-nightly</name>

      <triggers>  
        <multiTrigger operator="And"> 
            <triggers> 
                <projectTrigger project="MyProject" /> 
                <schedule开发者_如何学JAVATrigger time="11:23" buildCondition="ForceBuild">
                    <weekDays>
                        <weekDay>Monday</weekDay>
                        <weekDay>Tuesday</weekDay>
                        <weekDay>Wednesday</weekDay>
                        <weekDay>Thursday</weekDay>
                        <weekDay>Friday</weekDay>
                        <weekDay>Saturday</weekDay>
                    </weekDays>
                </scheduleTrigger>
            </triggers> 
        </multiTrigger>
    </triggers>

  </project>

When I remove this line:

<projectTrigger project="MyProject" />

the next build time in the Dashboard updates correctly, and it does execute at that time that is specified but nothing happens obviously.

What is wrong with this? I am using CruiseControl.net version: 1.5.7256.1


You don't have to create a different project.I think you misunderstand the ProjectTrigger too, ProjectTrigger is to start the build if another project has finished building (in your case it would start building MyProject-nightly when MyProject finished building, which I don't think is what you want).

What exactly is the behaviour you want?

If you want your project to build from source control modification and nighly you have to configure like this :

<triggers> 
    <intervalTrigger name="Polling From source control" seconds="60" BuildCondition="IfModificationExists"/>
    <scheduleTrigger time="23:30" buildCondition="ForceBuild" name="Nighly Build">
        <weekDay>Monday</weekDay>
        <weekDay>Tuesday</weekDay>
        <weekDay>Wednesday</weekDay>
        <weekDay>Thursday</weekDay>
        <weekDay>Friday</weekDay>
        <weekDay>Saturday</weekDay>
    </scheduleTrigger>
</triggers> 

which is strictly equivalent to a multitrigger with a OR operator.


I did find a different way to achieve this by simply not making a separate project and putting this in the one project:

<triggers> 
    <multiTrigger operator="And"> 
        <triggers>
        <intervalTrigger name="Continuous Integration" seconds="5" buildCondition="IfModificationExists" initialSeconds="30" />
            <scheduleTrigger time="20:00" buildCondition="ForceBuild">
                <weekDays>
                    <weekDay>Saturday</weekDay>
                </weekDays>
            </scheduleTrigger>
        </triggers> 
    </multiTrigger>
</triggers>

This gives both a scheduled build of the code on Saturday night at 8:00PM and will build if the source code changes.

Hopefully this can help someone else trying to achieve the same thing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜