From ed120d0dab502aa15499a197e2df7ccfa91facb3 Mon Sep 17 00:00:00 2001 From: "rhelmer%mozilla.com" Date: Tue, 24 Apr 2007 22:04:12 +0000 Subject: [PATCH] automate tinderbox configuration b=371325 r=preed git-svn-id: svn://10.0.0.236/trunk@224971 18797224-902f-48f8-a5cc-f745e15eee43 --- .../release/Bootstrap/Step/TinderConfig.pm | 95 +++++++++++++++++++ mozilla/tools/release/Makefile | 14 +-- mozilla/tools/release/bootstrap.cfg.example | 57 +++++++---- mozilla/tools/release/release | 4 +- 4 files changed, 142 insertions(+), 28 deletions(-) create mode 100644 mozilla/tools/release/Bootstrap/Step/TinderConfig.pm diff --git a/mozilla/tools/release/Bootstrap/Step/TinderConfig.pm b/mozilla/tools/release/Bootstrap/Step/TinderConfig.pm new file mode 100644 index 00000000000..a225d72fb35 --- /dev/null +++ b/mozilla/tools/release/Bootstrap/Step/TinderConfig.pm @@ -0,0 +1,95 @@ +## +# TinderConfig - creates config file for Tinderbox +## + +package Bootstrap::Step::TinderConfig; + +use Bootstrap::Step; +use Bootstrap::Config; +use MozBuild::TinderLogParse; +use MozBuild::Util qw(MkdirWithPath); + +@ISA = ("Bootstrap::Step"); + +sub Execute { + my $this = shift; + + my $config = new Bootstrap::Config(); + my $configBumpDir = $config->Get(var => 'configBumpDir'); + my $productTag = $config->Get(var => 'productTag'); + my $version = $config->Get(var => 'version'); + my $mozillaCvsroot = $config->Get(var => 'mozillaCvsroot'); + my $product = $config->Get(var => 'product'); + my $logDir = $config->Get(var => 'logDir'); + my $branchTag = $config->Get(var => 'branchTag'); + my $osname = $config->SystemInfo(var => 'osname'); + + my $releaseTag = $productTag . '_RELEASE'; + + MkdirWithPath(dir => $configBumpDir) + or die("Cannot mkdir $configBumpDir: $!"); + + foreach my $branch ($branchTag . '_release', $branchTag . '_l10n_release') { + $this->Shell( + cmd => 'cvs', + cmdArgs => ['-d', $mozillaCvsroot, + 'co', '-d', 'tinderbox-configs', + '-r', $branch, + 'mozilla/tools/tinderbox-configs/' . + $product . '/' . $osname], + logFile => catfile($logDir, + 'build_config-checkout-' . $branch . '.log'), + dir => $configBumpDir, + ); + + foreach my $configFile ('tinder-config.pl', 'mozconfig') { + $config->Bump( configFile => + catfile($configBumpDir, 'tinderbox-configs', $configFile)); + $this->Shell( + cmd => 'cvs', + cmdArgs => ['-d', $mozillaCvsroot, + 'ci', '-m', + '"Automated configuration bump, release for ' + . $product . ' ' . $version . '"', + 'tinderbox-configs/' . $configFile], + logFile => catfile($logDir, + 'build_config-checkin-' . $configFile . '-' . + $branch . '.log'), + dir => catfile($configBumpDir), + ); + } + } +} + +sub Verify { + my $this = shift; + + my $config = new Bootstrap::Config(); + my $branchTag = $config->Get(var => 'branchTag'); + my $logDir = $config->Get(var => 'logDir'); + + foreach my $branch ($branchTag . '_release', $branchTag . '_l10n_release') { + $this->CheckLog( + log => catfile($logDir, + 'build_config-checkout-' . $branch . '.log'), + notAllowed => 'fail', + ); + $this->CheckLog( + log => catfile($logDir, + 'build_config-checkout-' . $branch . '.log'), + notAllowed => 'aborted', + ); + foreach my $configFile ('mozconfig', 'tinder-config.pl') { + $this->CheckLog( + log => catfile($logDir, + 'build_config-checkin-' . $configFile . '-' . $branch . '.log'), + notAllowed => 'fail', + ); + $this->CheckLog( + log => catfile($logDir, + 'build_config-checkin-' . $configFile . '-' . $branch . '.log'), + notAllowed => 'aborted', + ); + } + } +} diff --git a/mozilla/tools/release/Makefile b/mozilla/tools/release/Makefile index fc694aa441c..eb850f6aab3 100644 --- a/mozilla/tools/release/Makefile +++ b/mozilla/tools/release/Makefile @@ -6,6 +6,7 @@ test: stage: # basic environment + mkdir -p /builds/config mkdir -p /builds/tags mkdir -p /builds/updates/ mkdir -p /builds/verify/ @@ -15,7 +16,7 @@ stage: mkdir -p /home/ftp/pub/firefox/releases/1.5/ touch /home/ftp/pub/firefox/releases/1.5/KEY # staging environment - mkdir -p /data/cltbld/firefox-1.5.0.11/batch1/stage + mkdir -p /data/cltbld/firefox-2.0.0.4/batch1/stage cvsmirror: cvsmirror_mofo cvsmirror_main @@ -24,11 +25,11 @@ cvsmirror_main: rsync -a --delete-after cvs-mirror.mozilla.org::l10n/ /builds/cvsmirror/l10n/ chgrp -R cvs /builds/cvsmirror/cvsroot /builds/cvsmirror/l10n chmod -R g+rw /builds/cvsmirror/cvsroot /builds/cvsmirror/l10n - cvs -d /builds/cvsmirror/cvsroot rtag -d FIREFOX_1_5_0_11_RELEASE mozilla - cvs -d /builds/cvsmirror/cvsroot rtag -d FIREFOX_1_5_0_11_RC1 mozilla - cvs -d /builds/cvsmirror/cvsroot rtag -d -B FIREFOX_1_5_0_11_MINIBRANCH mozilla - cvs -d /builds/cvsmirror/l10n rtag -d FIREFOX_1_5_0_11_RELEASE l10n - cvs -d /builds/cvsmirror/l10n rtag -d FIREFOX_1_5_0_11_RC1 l10n + cvs -d /builds/cvsmirror/cvsroot rtag -d FIREFOX_2_0_0_4_RELEASE mozilla + cvs -d /builds/cvsmirror/cvsroot rtag -d FIREFOX_2_0_0_4_RC1 mozilla + cvs -d /builds/cvsmirror/cvsroot rtag -d -B FIREFOX_2_0_0_4_MINIBRANCH mozilla + cvs -d /builds/cvsmirror/l10n rtag -d FIREFOX_2_0_0_4_RELEASE l10n + cvs -d /builds/cvsmirror/l10n rtag -d FIREFOX_2_0_0_4_RC1 l10n cvsmirror_mofo: mkdir -p /builds/cvsmirror/tmp/mofo @@ -46,6 +47,7 @@ cvsmirror_mofo: chmod -R g+rw /builds/cvsmirror/mofo clean_stage: + rm -rf /builds/config/* rm -rf /builds/tags/* rm -rf /builds/release/logs/* rm -rf /builds/updates/* diff --git a/mozilla/tools/release/bootstrap.cfg.example b/mozilla/tools/release/bootstrap.cfg.example index d788a316dd5..e3683640689 100644 --- a/mozilla/tools/release/bootstrap.cfg.example +++ b/mozilla/tools/release/bootstrap.cfg.example @@ -1,40 +1,55 @@ -productTag = FIREFOX_1_5_0_11 -branchTag = MOZILLA_1_8_0_BRANCH -pullDate = 2007-03-10 00:00 PST -l10n_pullDate = 2007-03-10 00:00 PST -version = 1.5.0.11 +version = 2.0.0.4 +milestone = 1.8.1.4 +# _RCn and _RELEASE will be appended as-needed +productTag = FIREFOX_2_0_0_4 +# Branch name and pull dates to use for base tag +branchTag = MOZILLA_1_8_BRANCH +pullDate = 2007-04-17 00:00:00 PDT +l10n_pullDate = 2007-04-17 00:00:00 PDT rc = 1 -oldVersion = 1.5.0.10 +# oldVersion and oldRc refer to the previous release +oldVersion = 2.0.0.3 oldRc = 1 -milestone = 1.8.0.11 appName = browser product = firefox -linux_buildDir = /builds/tinderbox/Fx-Mozilla1.8.0-Release -mac_buildDir = /builds/tinderbox/Fx-Mozilla1.8.0-Release -win32_buildDir = /cygdrive/c/builds/tinderbox/Fx-Mozilla1.8.0-Release -linux_l10n_buildDir = /builds/tinderbox/Fx-Mozilla1.8.0-l10n-Release -mac_l10n_buildDir = /builds/tinderbox/Fx-Mozilla1.8.0-l10n-Release -win32_l10n_buildDir = /cygdrive/c/builds/tinderbox/Fx-Mozilla1.8.0-l10n-Release -logDir = /home/rhelmer/src/full/build/logs +# Absolute path to tinderbox build directory +linux_buildDir = /builds/tinderbox/Fx-Mozilla1.8-Release +mac_buildDir = /builds/tinderbox/Fx-Mozilla1.8-Release +win32_buildDir = /cygdrive/c/builds/tinderbox/Fx-Mozilla1.8-Release +linux_l10n_buildDir = /builds/tinderbox/Fx-Mozilla1.8-l10n-Release +mac_l10n_buildDir = /builds/tinderbox/Fx-Mozilla1.8-l10n-Release +win32_l10n_buildDir = /cygdrive/c/builds/tinderbox/Fx-Mozilla1.8-l10n-Release +# Absolute path to store bootstrap's logs +logDir = /home/buildslave/console1/AutomationTest/build/logs mozillaCvsroot = /builds/cvsmirror/cvsroot l10nCvsroot = /builds/cvsmirror/l10n mofoCvsroot = /builds/cvsmirror/mofo +# private staging area stageHome = /data/cltbld updateDir = /builds/updates verifyDir = /builds/verify -patcherConfig = moz180-branch-patcher2.cfg tagDir = /builds/tags -linux_buildPlatform = Linux_2.4.21-37.EL_Depend +configBumpDir = /builds/config +# Build platform, as specified by tinderbox +linux_buildPlatform = Linux_2.6.9-42.ELsmp_Depend macosx_buildPlatform = Darwin_8.7.0_Depend win32_buildPlatform = WINNT_5.2_Depend -linux_l10n_buildPlatform = Linux_2.4.21-37.EL_Depend +linux_l10n_buildPlatform = Linux_2.6.9-42.ELsmp_Depend macosx_l10n_buildPlatform = Darwin_8.7.0_Depend win32_l10n_buildPlatform = WINNT_5.2_Depend from = bootstrap@example.com -to = engineer@example.com -cc = qa@example.com, build@example.com -patcherConfig = moz180-branch-patcher2.cfg +to = test@example.com +cc = other@example.com +patcherConfig = moz18-branch-patcher2.cfg +# Tag to use for building MAR/MBSDIFF and other update tools patcherToolsRev = MOZILLA_1_9a2_RELEASE -verifyConfig = moz180-firefox-linux.cfg +verifyConfig = moz18-firefox-linux.cfg blat = /cygdrive/d/moztools/bin/blat.exe sendmail = /usr/lib/sendmail +# dump Log output to stdout +dumpLogs = 1 +# username and server to push builds +sshUser = buildslave +sshServer = localhost +# Tinderbox server tree that clients should report to +buildTree = MozillaTest diff --git a/mozilla/tools/release/release b/mozilla/tools/release/release index 328c0952bef..3c7c1e7e85f 100755 --- a/mozilla/tools/release/release +++ b/mozilla/tools/release/release @@ -4,6 +4,7 @@ use strict; use Getopt::Long; use MozBuild::Util qw(Email); use Bootstrap::Step::Tag; +use Bootstrap::Step::TinderConfig; use Bootstrap::Step::Build; use Bootstrap::Step::Source; use Bootstrap::Step::Repack; @@ -13,6 +14,7 @@ use Bootstrap::Step::Sign; my @allSteps = ( 'Tag', + 'TinderConfig', 'Build', 'Source', 'Repack', @@ -148,7 +150,7 @@ sub PerformStep { to => $to, cc => \@ccList, subject => "$hostname - Step $stepName died: $error", - message => "$hostname - Step $stepName died: $error\nSee the release.log for more information.", + message => "$hostname - Step $stepName died: $error", ); exit(1); };