From c4c0d6fe14c302237e7f9df8296b8f4e556634d1 Mon Sep 17 00:00:00 2001 From: "rhelmer@mozilla.com" Date: Mon, 20 Aug 2007 17:32:16 -0700 Subject: [PATCH] varibilize download/ftp/stage.m.o and replace sshUser/sshServer w/ stagingUser/stagingServer b=391968 r=cf --- tools/release/Bootstrap/Step/Build.pm | 14 +++++------ tools/release/Bootstrap/Step/PatcherConfig.pm | 25 +++++++++++-------- tools/release/Bootstrap/Step/Repack.pm | 13 +++++----- tools/release/Bootstrap/Step/Updates.pm | 6 ++--- tools/release/bootstrap.cfg.example | 14 +++++++---- 5 files changed, 40 insertions(+), 32 deletions(-) diff --git a/tools/release/Bootstrap/Step/Build.pm b/tools/release/Bootstrap/Step/Build.pm index 3390a2e0e214..6bb64f880475 100644 --- a/tools/release/Bootstrap/Step/Build.pm +++ b/tools/release/Bootstrap/Step/Build.pm @@ -79,8 +79,8 @@ sub Push { my $productTag = $config->Get(var => 'productTag'); my $rc = $config->Get(var => 'rc'); my $logDir = $config->Get(sysvar => 'logDir'); - my $sshUser = $config->Get(var => 'sshUser'); - my $sshServer = $config->Get(var => 'sshServer'); + my $stagingUser = $config->Get(var => 'stagingUser'); + my $stagingServer = $config->Get(var => 'stagingServer'); my $rcTag = $productTag . '_RC' . $rc; my $buildLog = catfile($logDir, 'build_' . $rcTag . '-build.log'); @@ -108,7 +108,7 @@ sub Push { $this->Shell( cmd => 'ssh', - cmdArgs => ['-2', '-l', $sshUser, $sshServer, + cmdArgs => ['-2', '-l', $stagingUser, $stagingServer, 'mkdir -p ' . $candidateDir], logFile => $pushLog, ); @@ -129,14 +129,14 @@ sub Push { $this->Shell( cmd => 'ssh', - cmdArgs => ['-2', '-l', $sshUser, $sshServer, + cmdArgs => ['-2', '-l', $stagingUser, $stagingServer, 'chmod 0755 ' . $chmodArg], logFile => $pushLog, ); $this->Shell( cmd => 'ssh', - cmdArgs => ['-2', '-l', $sshUser, $sshServer, + cmdArgs => ['-2', '-l', $stagingUser, $stagingServer, 'rsync', '-av', '--include=*' . $osFileMatch . '*', '--exclude=*', @@ -185,8 +185,6 @@ sub StoreBuildID() { my $productTag = $config->Get(var => 'productTag'); my $rc = $config->Get(var => 'rc'); my $logDir = $config->Get(sysvar => 'logDir'); - my $sshUser = $config->Get(var => 'sshUser'); - my $sshServer = $config->Get(var => 'sshServer'); my $rcTag = $productTag . '_RC' . $rc; my $buildLog = catfile($logDir, 'build_' . $rcTag . '-build.log'); @@ -222,7 +220,7 @@ sub StoreBuildID() { $this->Shell( cmd => 'scp', cmdArgs => [$buildIDTempFile, - $sshUser . '@' . $sshServer . ':' . + $stagingUser . '@' . $stagingServer . ':' . $pushDir . '/' . $buildIDFile], logFile => $pushLog, ); diff --git a/tools/release/Bootstrap/Step/PatcherConfig.pm b/tools/release/Bootstrap/Step/PatcherConfig.pm index c67654b163c6..2689f96fc203 100644 --- a/tools/release/Bootstrap/Step/PatcherConfig.pm +++ b/tools/release/Bootstrap/Step/PatcherConfig.pm @@ -30,6 +30,9 @@ sub Execute { my $oldVersion = $config->Get(var => 'oldVersion'); my $mofoCvsroot = $config->Get(var => 'mofoCvsroot'); my $patcherConfig = $config->Get(var => 'patcherConfig'); + my $stagingServer = $config->Get(var => 'stagingServer'); + my $ftpServer = $config->Get(var => 'ftpServer'); + my $bouncerServer = $config->Get(var => 'bouncerServer'); # Create patcher config area in the config bump area. if (not -d $configBumpDir) { @@ -84,8 +87,10 @@ sub BumpPatcherConfig { my $oldRc = $config->Get(var => 'oldRc'); my $localeInfo = $config->GetLocaleInfo(); my $patcherConfig = $config->Get(var => 'patcherConfig'); - my $sshUser = $config->Get(var => 'sshUser'); - my $sshServer = $config->Get(var => 'sshServer'); + my $stagingUser = $config->Get(var => 'stagingUser'); + my $stagingServer = $config->Get(var => 'stagingServer'); + my $ftpServer = $config->Get(var => 'ftpServer'); + my $bouncerServer = $config->Get(var => 'bouncerServer'); my $logDir = $config->Get(sysvar => 'logDir'); # First, parse the file. @@ -154,7 +159,7 @@ sub BumpPatcherConfig { my $rcStr = 'rc' . $rc; my $partialUpdate = {}; - $partialUpdate->{'url'} = 'http://download.mozilla.org/?product=' . + $partialUpdate->{'url'} = 'http://' . $bouncerServer . '/?product=' . $product. '-' . $version . '-partial-' . $oldVersion . '&os=%bouncer-platform%&lang=%locale%'; @@ -165,12 +170,12 @@ sub BumpPatcherConfig { '.%locale%.%platform%.partial.mar'); $partialUpdate->{'betatest-url'} = - 'http://stage.mozilla.org/pub/mozilla.org/' . $product. '/nightly/' . + 'http://' . $stagingServer. '/pub/mozilla.org/' . $product. '/nightly/' . $version . '-candidates/' . $rcStr . '/' . $product . '-' . $oldVersion . '-' . $version . '.%locale%.%platform%.partial.mar'; $partialUpdate->{'beta-url'} = - 'http://ftp.mozilla.org/pub/mozilla.org/' . $product. '/nightly/' . + 'http://' . $ftpServer . '/pub/mozilla.org/' . $product. '/nightly/' . $version . '-candidates/' . $rcStr . '/' . $product . '-' . $oldVersion . '-' . $version . '.%locale%.%platform%.partial.mar'; @@ -178,7 +183,7 @@ sub BumpPatcherConfig { # Now the same thing, only complete update my $completeUpdate = {}; - $completeUpdate->{'url'} = 'http://download.mozilla.org/?product=' . + $completeUpdate->{'url'} = 'http://' . $bouncerServer . '/?product=' . $product . '-' . $version . '-complete&os=%bouncer-platform%&lang=%locale%'; @@ -187,12 +192,12 @@ sub BumpPatcherConfig { '.%locale%.%platform%.complete.mar'); $completeUpdate->{'betatest-url'} = - 'http://stage.mozilla.org/pub/mozilla.org/' . $product. '/nightly/' . + 'http://' . $stagingServer . '/pub/mozilla.org/' . $product. '/nightly/' . $version . '-candidates/' . $rcStr . '/' . $product . '-' . $version . '.%locale%.%platform%.complete.mar'; $completeUpdate->{'beta-url'} = - 'http://ftp.mozilla.org/pub/mozilla.org/' . $product. '/nightly/' . + 'http://' . $ftpServer . '/pub/mozilla.org/' . $product. '/nightly/' . $version . '-candidates/' . $rcStr . '/' . $product . '-' . $version . '.%locale%.%platform%.complete.mar'; @@ -217,7 +222,7 @@ sub BumpPatcherConfig { $bh->close(); $this->Shell( cmd => 'scp', - cmdArgs => [$sshUser . '@' . $sshServer . ':' . + cmdArgs => [$stagingUser . '@' . $stagingServer . ':' . $candidateDir .'/' . $os . '_info.txt', $buildIDTempFile], ); @@ -257,7 +262,7 @@ sub BumpPatcherConfig { $releaseObj->{'locales'} = join(' ', sort (keys(%{$localeInfo}))); $releaseObj->{'completemarurl'} = - 'http://stage.mozilla.org/pub/mozilla.org/' . $product. '/nightly/' . + 'http://' . $stagingServer . '/pub/mozilla.org/' . $product. '/nightly/' . $version . '-candidates/' . $rcStr . '/' . $product . '-'. $version . '.%locale%.%platform%.complete.mar', diff --git a/tools/release/Bootstrap/Step/Repack.pm b/tools/release/Bootstrap/Step/Repack.pm index 978bd8642124..f50631797fab 100644 --- a/tools/release/Bootstrap/Step/Repack.pm +++ b/tools/release/Bootstrap/Step/Repack.pm @@ -50,6 +50,7 @@ sub Verify { my $oldVersion = $config->Get(var => 'oldVersion'); my $mozillaCvsroot = $config->Get(var => 'mozillaCvsroot'); my $verifyDir = $config->Get(var => 'verifyDir'); + my $stagingServer = $config->Get(var => 'stagingServer'); my $rcTag = $productTag.'_RC'.$rc; @@ -82,7 +83,7 @@ sub Verify { '--include=*.exe', '--include=*.tar.gz', '--exclude=*', - 'stage.mozilla.org:/home/ftp/pub/' . $product + $stagingServer . ':/home/ftp/pub/' . $product . '/nightly/' . $version . '-candidates/rc' . $rc . '/*', $product . '-' . $version . '-rc' . $rc . '/', ], @@ -101,7 +102,7 @@ sub Verify { '--include=*.exe', '--include=*.tar.gz', '--exclude=*', - 'stage.mozilla.org:/home/ftp/pub/' . $product + $stagingServer . ':/home/ftp/pub/' . $product . '/nightly/' . $oldVersion . '-candidates/rc' . $oldRc . '/*', $product . '-' . $oldVersion . '-rc' . $oldRc . '/', @@ -168,8 +169,8 @@ sub Push { my $productTag = $config->Get(var => 'productTag'); my $rc = $config->Get(var => 'rc'); my $logDir = $config->Get(sysvar => 'logDir'); - my $sshUser = $config->Get(var => 'sshUser'); - my $sshServer = $config->Get(var => 'sshServer'); + my $stagingUser = $config->Get(var => 'stagingUser'); + my $stagingServer = $config->Get(var => 'stagingServer'); my $rcTag = $productTag . '_RC' . $rc; my $buildLog = catfile($logDir, 'repack_' . $rcTag . '-build-l10n.log'); @@ -195,14 +196,14 @@ sub Push { $this->Shell( cmd => 'ssh', - cmdArgs => ['-2', '-l', $sshUser, $sshServer, + cmdArgs => ['-2', '-l', $stagingUser, $stagingServer, 'mkdir -p ' . $candidateDir], logFile => $pushLog, ); $this->Shell( cmd => 'ssh', - cmdArgs => ['-2', '-l', $sshUser, $sshServer, + cmdArgs => ['-2', '-l', $stagingUser, $stagingServer, 'rsync', '-av', '--include=*' . $osFileMatch . '*', '--include=*.xpi', diff --git a/tools/release/Bootstrap/Step/Updates.pm b/tools/release/Bootstrap/Step/Updates.pm index 6f29c56fed16..f496d04f8317 100644 --- a/tools/release/Bootstrap/Step/Updates.pm +++ b/tools/release/Bootstrap/Step/Updates.pm @@ -212,8 +212,8 @@ sub Push { my $version = $config->Get(var => 'version'); my $rc = $config->Get(var => 'rc'); my $oldVersion = $config->Get(var => 'oldVersion'); - my $sshUser = $config->Get(var => 'sshUser'); - my $sshServer = $config->Get(var => 'sshServer'); + my $stagingUser = $config->Get(var => 'stagingUser'); + my $stagingServer = $config->Get(var => 'stagingServer'); my $ausUser = $config->Get(var => 'ausUser'); my $ausServer = $config->Get(var => 'ausServer'); my $updateDir = $config->Get(var => 'updateDir'); @@ -232,7 +232,7 @@ sub Push { '--exclude=*', catfile('ftp', $product, 'nightly', $version . '-candidates', 'rc' . $rc) . '/', - $sshUser . '@' . $sshServer . ':' . $candidateDir], + $stagingUser . '@' . $stagingServer . ':' . $candidateDir], dir => $fullUpdateDir, logFile => $pushLog, ); diff --git a/tools/release/bootstrap.cfg.example b/tools/release/bootstrap.cfg.example index cfe6ecda5e10..56543fd27598 100644 --- a/tools/release/bootstrap.cfg.example +++ b/tools/release/bootstrap.cfg.example @@ -20,7 +20,7 @@ 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 +logDir = /builds/logs mozillaCvsroot = /builds/cvsmirror/cvsroot l10nCvsroot = /builds/cvsmirror/l10n mofoCvsroot = /builds/cvsmirror/mofo @@ -48,11 +48,15 @@ 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 # username and server to push update snippets to -ausUser = buildslave +ausUser = cltbld ausServer = localhost # Tinderbox server tree that clients should report to buildTree = MozillaTest +# where QA updates/builds go +stagingUser = cltbld +stagingServer = stage.mozilla.org +# where beta updates/builds go +ftpServer = ftp.mozilla.org +# where release updates/builds go +bouncerServer = download.mozilla.org