8

I'm trying to configure CruiseControl to build the project on every modification of source code and every day at 3:00am. This is what 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?

yegor256
  • 102,010
  • 123
  • 446
  • 597

5 Answers5

2

I usally use cc.net, but when I understand the documentation correctly you have two options:

  • Use 2 projects
  • Set the requireModifications attribute to false (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.

Stefan Egli
  • 17,398
  • 3
  • 54
  • 75
1

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.

daramarak
  • 6,115
  • 1
  • 31
  • 50
1

As I understand there is no possibility in CruiseControl to do this :(

yegor256
  • 102,010
  • 123
  • 446
  • 597
  • We do this, and have done this for several years with CruiseControl. So it is definitely possible, please see my answer. – daramarak Jan 03 '14 at 15:29
0

I thought of a way, the build script split to make plug-ins.

For example: https://github.com/LightWare/LightCI/blob/master/config.xml

j0k
  • 22,600
  • 28
  • 79
  • 90
liouys
  • 1
  • Welcome to Stack Overflow! Welcome to stackoverflow. This question is old and was already answered. Typically, it is best not to resurrect stale threads unless your response contributes something significantly new or different over previous answers. – oers Oct 29 '12 at 08:34
0

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;-)

Jakub Konecki
  • 45,581
  • 7
  • 87
  • 126
  • Is it possible to use this plugin with CruiseControl 2.8.3? Btw, those huge XML files are a good thing for me, since I can configure CC automatically, without any user interface. – yegor256 Oct 17 '10 at 15:31
  • @Vincenzo - I don't think you can use it in CC (it's in CC.net). As a side note, I also once thought that having automatic cc config files generator is a nice thing. In TeamCity you just don't need that much configuration (they have build templates, etc) – Jakub Konecki Oct 17 '10 at 15:38
  • Thanks for your comment, but I can't migrate to CC.net (because of the platform), and I'm not ready to migrate to TeamCity. So, I'm looking for a solution for CruiseControl 2.8.3. – yegor256 Oct 17 '10 at 15:42