Many CruiseControl users have a need to run an administrative task whenever the server running the CruiseControl service is rebooted.
A practical example of this is with ClearCase dynamic views. As of this writing IBM/Rational has no methodology that allows views to be started whenever a computer reboots.
Many have used the operating system to do this for them (either with init.d in Unix or with scheduled tasks in the Microsoft world). While workable, this "hides" what really needs to be done to get CruiseControl up and running. This may well confuse another person who isn't aware of what was done and now needs to support the product. They may, in fact, need to contact the person whose decision to install CruiseControl met with such success that they are now extremely wealthy and sitting comfortably on the porch of their Tuscan villa.
For those who are interested, here was my problem and the resolution:
- I'm running CruiseControl using the Java Service Wrapper and, as such, really don't have many good startup options.
- ClearCase doesn't have a way to mount dynamic views on boot up.
- I don't want to "hide" what I did in a startup task in Windows.
Here is what I did:
- Created a directory called "rebootCheck" in my CruiseControl distribution directory.
- Created a scheduled task that simply ran GNU touch on boot up out to rebootcheck/rebootcheck.txt (Yes, I know this still hides something but its better than putting all the code in the batch file).
- Created a CC project with a filesystem modification set that runs an ant script mounting my views and commented the hell out of it.
It's a little kludgy but it solves my problems.