How to make force build with interval with CCNet

639 views Asked by At

On our CCNet, there is a build (called release) that build the full package of the application and then copy the msi on a FTP server for the client.

There are no trigger on that project and it should be manually launched via CCtray or dashboard.

Is it possible to manually force the project but that the project really start on a fixed time (like 01:00:00) ?

thx,

2

There are 2 answers

3
TridenT On

Simply use the scheduleTrigger tag.

<scheduleTrigger time="01:00" buildCondition="ForceBuild" name="Scheduled">
  <weekDays>
    <weekDay>Monday</weekDay>
  </weekDays>
</scheduleTrigger>

You can even specify which day in the week with the weekDays tag.

1
Damir Arh On

You could set up the trigger for your project as TridenT already suggested. Then you would create another project that could only be triggered manually. This second project would be used to collect the dynamic parameters that you need and store them into a file.

In the original project you would add a conditional task at the beginning to check for the existance of that file. You would only start the build if the file existed and use the values from it. At the end you'd delete the file so that it wouldn't trigger the build again the next day.

It is a bit convoluted but it's really the only solution that comes to my mind to achieve the required functionality.