Friday, December 1, 2017

CIT Building

Posted on 
Worked a lot on a script to drive the building. This script, called build, utilizes a configuration file as well as command line parameters to support adhoc kind of building (e.g. "Start a build but only build component X, noclean and do the testing, etc.).

Recently added what is called CIT (Continuous Intergration and Test) option as well as some build avoidance at the component level (utilizing the output from cleartool's update command). With --cit turned on the build script will attempt a build by first updating the view. It will then parse cleartool's update log. If nothing new came in for the component then the assumption is made that the component does not need to be rebuilt and skips it. After all components are built, will do other things like publishing and testing, etc. Next build will make a baseline (IFF the returns 0 status and at least one component was built) as well as update change logs on the web page.

When all of that is done, build will wait for 5 minutes and then restart itself.

Worked out a nasty bug where build was using chdir but was using $ENV {PWD}. Turns out that chdir does not change $ENV {PWD}. Fixed by doing "use Cwd qw(chdir)" which effectively sets $ENV {PWD} when chdir is called.

WARNING: Found out that was not that robust and does not return non zero status for some failures. For example, if it is not able to run unitTests it still might return a 0 status. This is bad. The script will have to be investigated and made to return good exit codes.

No comments:

Post a Comment

Posted on  November 23, 2005 Continued to help several users with connecting to the new Controller Clearquest Database for Vinh...