Installation of CABIE server ============================ Bill of Materials ---------------------------- The CABIE server directory layout is as follows: buildserver.pl: ___________________________________________________________________________ The CABIE server poll.txt: The poll file listing the jobs to build updatejobs.sh: ___________________________________________________________________________ A unix example file for updating the buildserver remotely updatejobs.cmd: ___________________________________________________________________________ A Windows example file for updating the buildserver remotely bin\builder.pl: ___________________________________________________________________________ The master build program. This program is forked from the CABIE server when changes are detected to a client workspace or a CVS repository build_docs\example_job.txt: ___________________________________________________________________________ This is what a text file describing a job defined in the CABIE server called example_job. This is the file which is opened with the command 'build instructions -n example_job.txt' config\example_job.errors: ___________________________________________________________________________ This is the file parsed at the end of the build of a job called 'example_job'. This is a custom file which can be edited to add additional error statements. There is an alternate form of telling the server that a build job failed using a non-zero return code from the user definable build script (will be covered later). jobs\example_job\prebuild.sh: ** ___________________________________________________________________________ An example prebuild script called by the builder.pl executable. This script is passed the following arguements: $1 = Top of the source tree $2 = The build type $3 = Title of build $4 = Unique build number jobs\example_job\postbuild.sh: ** ___________________________________________________________________________ An example postbuild script called by the builder.pl executable upon completion of the build. This script is passed the following arguments: $1 = Top of the source tree $2 = The build type $3 = Title of build $4 = Unique build number jobs\example_job\onfail.sh: ** ___________________________________________________________________________ An example script called by the builder.pl executable if a build fails. This script if passed the following arguments: $1 = Top of the source tree $2 = The build type $3 = Title of build $4 = Unique build number jobs\example_job\rtlbuild.sh: * ___________________________________________________________________________ An example script called by the builder.pl that calls the build. This script calls the make system, or development environment of your choice. In this example some environment variables are set, and ant is called to perform the build. This has been used with gnumake, nmake, make, devstudio etc. Any build that can be run from the command line can be put into this script. This script is passed the following arguments: $1 = Top of the source tree $2 = Title of build $3 = Unique build number jobs\example_job\dbgbuild.sh: *** ___________________________________________________________________________ An example script called by the builder.pl that calls the build. This script calls the make system, or development environment of your choice. In this example some environment variables are set, and ant is called to perform the build. This has been used with gnumake, nmake, make, devstudio etc. Any build that can be run from the command line can be put into this script. This script is passed the following arguments: $1 = Top of the source tree $2 = Title of build $3 = Unique build number jobs\shared\*.pl: ___________________________________________________________________________ Some example script useful for additional functionality. I use them to clean up builds, to fork multiple processes to clean, diff and checkin files. Feel free to drop me a line if you're interested in their functionality. lib\: ___________________________________________________________________________ Core files needed by CABIE to operate correctly. The only files ment to be edited are unix_example.pm, and WIN32_EXAMPLE.pm. Both will be covered later in this document. proc\: ___________________________________________________________________________ Multiple files will appear here. This is where CABIE writes STDOUT and STDERR along with the connection and rejection logs. If there's a problem with the operation of CABIE check here first. skeleton\: ___________________________________________________________________________ More example jobs, this time for both UNIX and Windows. Use these as templates to create your own scripts. support\mailer.pl: ___________________________________________________________________________ The script used to mail build results to developers, and subscribers etc. updates\hostname.whatsnew.txt: ___________________________________________________________________________ A text file which any user with the CABIE commandline client can query using the 'whatsnew' call. This file must be have the same prefix as the machine it is running on ie: cabie.whatsnew.txt if the name of the machine is cabie. sql\schema: ___________________________________________________________________________ The file used to create the database under MySql used by CABIE. * With either rtlbuild or dbgbuild a non zero return code will result in telling CABIE that the build failed. ** Not mandatory files *** = * and ** Prerequsites ---------------------------- A. Windows 1. An installation of MySql (which won't be covered here) Create the database using the schema file sql/schema. Copy the file to the MySql installation under bin and type: mysql >\. schema 2. An installation of ActiveState perl 5.6.1 or greater from: http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl 3. The following packages from ActiveState a. Mail::Sendmail b. FreezeThaw b. DBI Use the Programmers Package Manager supplied with ActiveState to install these packages as follows: ppm > install Mail::Sendmail > install FreezeThaw > install DBI > install DBD::mysql (this will return multiple packages) > install [n] where [n] = DBD-mysql 4. The following packages from Roth.net a. Win32::Daemon b. Win32::AdminMisc Use the Programmers Package Manager supplied with ActiveState to install these packages as follows: ppm > rep add RothConsulting http://www.roth.net/perl/packages > install Win32::Daemon > install [n] where [n] = Win32-Daemon > install Win32::AdminMisc 5. Perforce or CVS binaries installed and in the system path After goint through the above steps you will need to create a config file for cabie using lib/WIN32_EXAMPLE.pm. To do so type the following at the command prompt: C:\> set COMPUTERNAME Copy lib/WIN32_EXAMPLE.pm to lib/COMPUTERNAME.pm where COMPUTERNAME is the name of your computer (case is important). Edit the new file and substitute the following: # # Package declaration change to machine name. # package WIN32_EXAMPLE; With: # # Package declaration change to machine name. # package COMPUTERNAME; Again, substitute COMPUTERNAME with the name of your returned from the set command above. Next you will need to edit all the values defined under 'my %fields' in order to tell CABIE where to find all necessary drives, paths, etc. The file is well commented. The entries with 'http:' are for the web server you will use for CABIE. The default COMPUTERNAME.pm file is setup as though CABIE is run from the D: drive of you machine, if you extracted the CABIE.zip file to another directory you will eighrt need to copy the contents to another directory or edit the COMPUTERNAME.pm file and change values to point to the directory you extracted CABIE into. Starting CABIE ============================ To start CABIE you will need to have administrative priviledges to the machine you are running it on - it runs as a service, therefor you'll need to install the service. At the DOS prompt, CD to the directory where buildserver.pl resides and type the following: D:\buildserver\server> buildserver.pl -s 9190 -m 9192 -i You will get 2 messages about the service installed. The service can now be started from the control panel.