how to configure CruiseControl for two separate builds?
I'm trying to configure CruiseControl to build the project on every modification of source code and every day at 3:00am. This is w开发者_开发问答hat I've done so far in project.xml
(and it doesn't work, daily builds are not done):
...
<schedule interval="120">
<maven2 … />
<maven2 … time="0300"/>
</schedule>
...
What am I doing wrong?
I usally use cc.net, but when I understand the documentation correctly you have two options:
- Use 2 projects
- Set the
requireModifications
attribute tofalse
(which is not exactly what you want)
What happens with your configuration is the following: The "modification" build will be run throughout the day and thus at 03:00 am CruiseControl cannot detect any modifications (at least I would assume so). As there are no modifications the daily build is not run.
From the documentation:
... it is usually not a good idea to mix time builds and multiple builds in the same project as the multiple builds will "eat" all the changes before they can be detected by the time based builds.
As I understand there is no possibility in CruiseControl to do this :(
We listen for changes in a gitrepo and do nightly builds every night, we do it like this:
<schedule interval="${buildtime}">
<ant antscript="ant.bat"
buildfile="build.xml"
</ant>
</schedule>
<bootstrappers>
<gitbootstrapper localWorkingCopy="${checkout_folder}"/>
</bootstrappers>
<modificationset quietperiod="${quiettime}"
Ignorefiles="${ignorelist}">
<git localWorkingCopy="${checkout_folder}"/>
<timebuild username="Cruisecontrol nightwatch"
time="0300"
property="build_nightly"/>
</modificationset>
As you see here the clue here is that the timed build is placed in the modificationset
, not the schedule
, so at each scheduled time it will check if either the git repo has changed or the time has come to do the nightly build.
I was using ScheduleTrigger for CruiseControl.net.
Some time ago I've migrated CI server from CC.net to TeamCity - do take a look at it (they have free version as well). It's much better and easier to configure (say goodbye to those huge unmanageable XML config files;-)
I thought of a way, the build script split to make plug-ins.
For example: https://github.com/LightWare/LightCI/blob/master/config.xml
精彩评论