Question

I am using one server to build the same project both continuously and nightly; however I would like the nightly build to only build if a modification exists during the day. I am hoping to achieve this with the constraint that both builds use the same working folder.

The two options I am considering are:

  1. Polling the continuous build and only build the nightly build if a continuous build has occurred - possibly using some token system (continuous build sets token, nightly clears token).

  2. Running a prebuild task to revert the source code to the Last Build Time

I am leaning towards the second option as it decouples the build scripts, but it seems to be a much harder task.

Suggestions and tips to doing this would be appreciated!

Added Information:

The CI build is a quick build of the solution in one configuration and maybe runs some fast unit tests.

The nightly build cleans the build environment, builds the software, packages into an installer, runs extended tests, labels the source code repository, deploys the installer to a server share for manual testers to pick up, and emails the test team that a testable build has been made.

I only want the nightly build to occur if there were any check-ins during the day so that testers don't get plagued with repeat emails for essentially the same build.

Was it helpful?

Solution 2

I am happy with my new solution...

I use a MultiTrigger with a scheduleTrigger and a prjectTrigger on the nightly build (better to call full build) and WriteModification/ReadModification pairs to propagate the modification history like in this question.

OTHER TIPS

I might be over simplifying this task but can't you simply setup two triggers on the project? One interval trigger for the continuous builds and one schedule trigger with the IfModificationExists condition for the nightly builds.

<triggers>
  <intervalTrigger seconds="60" name="Continuous" />
  <scheduleTrigger time="23:30" buildCondition="IfModificationExists" name="Scheduled">
      <weekDays>
        <weekDay>Monday</weekDay>
      </weekDays>
  </scheduleTrigger>
</triggers>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top