# # Copyright (c) 2002-2004 Eric Wallengren # This file is part of the Continuous Automated Build and Integration # Environment (CABIE) # # CABIE is distributed under the terms of the GNU General Public # License version 2 or any later version. See the file COPYING for copying # permission or http://www.gnu.org. # # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR # IMPLIED, without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. ANY USE IS AT YOUR OWN RISK. # # Permission to modify the code and to distribute modified code is granted, # provided the above notices are retained, and a notice that the code was # modified is included with the above copyright notice. # # # Package declaration change to machine name. # package WIN32_EXAMPLE; # # Use Carp for error handling # use Carp; # # Configuration section, edit to suite build machine configuration... # To view configuration information from the server, use the # dumpconfig command. # my %fields = ( BD => 'd:\\', #BuildDrive - BSR => 'd:\\buildserver\\server', # BuildServerRoot BC => 'd:\\buildserver\\server\\bin\\builder.pl', # BuildCommand BTMP => 'd:\\temp', # Where is temp? COMPANY => 'companyname.com', # Company name (for email) DFCMD => '', # df command, has no affect with win2k DEFGROUP => 'dev', # Default group for cm systems BUGDB => 'http://bugdb.company.com/cqweb/viewentity/default_content.asp?id=%s', # Link to bug db with formatting for printf (string only please!) WORKDRIVE => '\\', # Define workdir and drive NULL => 'nul', # Define null device JOBDIR => 'g:\\builds', # Where do the jobs get copied to by the postbuild scripts W2K => '/y', # Arg to W2k copy command MAILER => 'd:\\buildserver\\server\\support\\mailer.pl', # Mailer SHAREPOINT => '\\\\ultra10\\build', # Network share point to be displayed in mailer... SMTP => 'slcnot1.sct.com', # Where is the smtp server NOTIFYFROM => 'Build Server ', # Build completion notification from ADMIN => 'buildadmin@company.com', # Address for build admin ALTERNATE => 'alternate@company.net', # Any alternate email addresses for catastrophic server events WEBSERVER => 'http://build/builds', # Web server where build can be found RLCHG => 0, # Change number from SCCS (Don't edit) BLDNUM => 0, # Incremental build number (if defined) (Don't edit) INCREMENT => 0, # Boolean - always increment build number LSTCHG => 0, # For perforce remote depots (Don't edit) PARALLEL => 0, # Set to 0 if jobs should be run sequentially PRN => 0, # A product release number (Don't edit) REMOVEALL => 0, # Remove hashed number of saved builds (with .build file). PREBUILD => 'prebuild.cmd', # name of prebuild trigger POSTBUILD => 'postbuild.cmd', # name of postbuild trigger ONFAIL => 'onfail.cmd', # name of failure trigger RETAIL => 'rtlbuild.cmd', # name of retail build script DEBUG => 'dbgbuild.cmd', # name of debug build script UPDATEJOBS => 'updatejobs.cmd', # name of script for updating build scripts PROMOTION => 'g:\\promotion', # name of parent directory for promoted builds RELEASE => 'g:\\GA', # name of parent directory for released builds ISADDR => 'itaddress@company.com', # Name of someone in IS for HW problems OPENFOLD => 'http://buildserver/icons/openfold.gif', CLOSEDFOLD => 'http://buildserver/icons/closedfold.gif', # Name of the close folder icon GREENICON => 'http://ultra10/icons/greenlight.gif', # Name and location of green (success) icon REDICON => 'http://ultra10/icons/redlight.gif', # Name and location of red (build failure) icon YELLOWICON => 'http://ultra10/icons/yellowlight.gif', # Name and location of yellow (test failure) icon RUNICON => 'http://ultra10/icons/runner.gif', # Name and location of job running icon DISICON => 'http://ultra10/icons/smchk_rd.gif', # Name and location of job disabled icon PROMOICON => 'http://ultra10/icons/disk.gif', # Icon used for build promotion POLLFILE => 'poll.txt', # File to use for polling job in monitor thread LOGOICON => 'http://ultra10/icons/logo_home.gif', # Icon for company logo CVS => 'http://ultra10/icons/cvs.gif', # Icon for CVS logo CVSROOT => 'd:\\cvsdir\\cvsroot', # Where CVS administrative files are checked out to. PERFORCE => 'http://ultra10/icons/perforce.gif', # Icon for Perforce logo INFOICON => 'http://ultra10/icons/info2.gif', # Icon for server information PENDICON => 'http://ultra10/icons/stargold.gif', # Icon for Pending changes CGIBIN => 'http://ultra10/cgi-bin', # Location for cgi-bin used by web server USESQL => 1, # Is there a SQL backend? (Don't edit) SQLSERVER => 'sqlsrver.companyname.com', # Name of SQL server used for storing build information SQLID => 'builduser', # Name of user with permissions to access SQL server NOTIFYALL => 0, # Notify all upon build failures GLOBMAIL => 'developers@company.com', # Global email alias for developers SMTPDELIM => ',', # Delimeter for SMTP addressing P4USER => 'build', # User ID for pulling and updating files from Perforce P4PASSWD => 'buildpassword', # User ID for pulling and updating files from Perforce FAILALL => 0, # Notify for sequestial failures NOTTESTED => 'BUILD NOT TESTED', # Name for file to be put in output direct TESTED => 'BUILD PASSED SMOKETESTS', # Name for file when build has pass DEFGROUP => 'dev', # Default group name, for adding users to perforce ); # # Change to suite job descriptions # sub formatjobid { # # Edit to suite the type of job number to construct from # the builder process. Use $self->OPTION where OPTION is # one of the following (from above): # RLCHG # BLDNUM # LSTCHG # PRN # # Use any combination (or all of them) in the printf statement: # sprintf "%s", $self->RLCHG # sprintf "%s.%s", $self->BLDNUM, $self->RLCHG # my $self = shift; my $IDFORMAT = sprintf "%s.%s", $self->RLCHG, $self->BLDNUM; return $IDFORMAT; } # # Do not edit anything below this line... # # Object constructor... # sub new { my $that = shift; my $class = ref($that) || $that; my $self = { %fields, }; bless $self, $class; return $self; } # # Autoload definitions in this package... # sub AUTOLOAD { my $self = shift; my $type = ref($self) || croak "$self is not an object"; my $name = $AUTOLOAD; $name =~ s/.*://; unless (exists $self->{$name}) { croak "Can't access `$name` field in an object of class $type"; } if (@_) { return $self->{$name} = shift; } else { return $self->{$name}; } } 1;