varibilize download/ftp/stage.m.o and replace sshUser/sshServer w/ stagingUser/stagingServer b=391968 r=cf
authorrhelmer@mozilla.com
Mon, 20 Aug 2007 17:32:16 -0700
changeset 4840 4b71bf03d167787826db0d65ec9c2e642f70c72f
parent 4839 0dea790b2b19e6290f3f0eb83c752364bcae5ecc
child 4841 43bd8a5c7a7a6661280af0a7f48a8940f2c02a91
push idunknown
push userunknown
push dateunknown
reviewerscf
bugs391968
milestone1.9a8pre
varibilize download/ftp/stage.m.o and replace sshUser/sshServer w/ stagingUser/stagingServer b=391968 r=cf
tools/release/Bootstrap/Step/Build.pm
tools/release/Bootstrap/Step/PatcherConfig.pm
tools/release/Bootstrap/Step/Repack.pm
tools/release/Bootstrap/Step/Updates.pm
tools/release/bootstrap.cfg.example
--- a/tools/release/Bootstrap/Step/Build.pm
+++ b/tools/release/Bootstrap/Step/Build.pm
@@ -74,18 +74,18 @@ sub Verify {
 
 sub Push {
     my $this = shift;
 
     my $config = new Bootstrap::Config();
     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');
     my $pushLog  = catfile($logDir, 'build_' . $rcTag . '-push.log');
 
     my $logParser = new MozBuild::TinderLogParse(
         logFile => $buildLog,
     );
@@ -103,17 +103,17 @@ sub Push {
     if ($osFileMatch eq 'win32')  {
       $osFileMatch = 'win';
     } elsif ($osFileMatch eq 'macosx') {
       $osFileMatch = 'mac';
     }
 
     $this->Shell(
       cmd => 'ssh',
-      cmdArgs => ['-2', '-l', $sshUser, $sshServer,
+      cmdArgs => ['-2', '-l', $stagingUser, $stagingServer,
                   'mkdir -p ' . $candidateDir],
       logFile => $pushLog,
     );
 
     # Make sure permissions are created on the server correctly;
     #
     # Note the '..' at the end of the chmod string; this is because
     # Config::GetFtpCandidateDir() returns the full path, including the
@@ -124,24 +124,24 @@ sub Push {
     # XXX - This is ugly; another solution is to fix the umask on stage, or
     # change what GetFtpCandidateDir() returns.
 
     my $chmodArg = CvsCatfile($config->GetFtpCandidateDir(bitsUnsigned => 0), 
      '..');
 
     $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=*', 
                   $pushDir, 
                   $candidateDir],
       logFile => $pushLog,
     );
 }
@@ -180,18 +180,16 @@ sub Announce {
 
 sub StoreBuildID() {
     my $this = shift;
 
     my $config = new Bootstrap::Config();
     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');
     my $pushLog  = catfile($logDir, 'build_' . $rcTag . '-push.log');
 
     my $logParser = new MozBuild::TinderLogParse(
         logFile => $buildLog,
     );
@@ -217,16 +215,16 @@ sub StoreBuildID() {
     print $bh 'buildID=' . $buildID;
     $bh->close() || 
      die("Could not open buildID temp file $buildIDTempFile: $!");
 
     my $buildIDFile = $osFileMatch . '_info.txt';
     $this->Shell(
       cmd => 'scp',
       cmdArgs => [$buildIDTempFile, 
-                  $sshUser . '@' . $sshServer . ':' .
+                  $stagingUser . '@' . $stagingServer . ':' .
                   $pushDir . '/' . $buildIDFile],
       logFile => $pushLog,
     );
 }
 
 1;
 
--- a/tools/release/Bootstrap/Step/PatcherConfig.pm
+++ b/tools/release/Bootstrap/Step/PatcherConfig.pm
@@ -25,16 +25,19 @@ sub Execute {
 
     my $config = new Bootstrap::Config();
     my $logDir = $config->Get(sysvar => 'logDir');
     my $configBumpDir = $config->Get(var => 'configBumpDir');
     my $version = $config->Get(var => 'version');
     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) {
         MkdirWithPath(dir => $configBumpDir) 
           or die("Cannot mkdir $configBumpDir: $!");
     }
 
     # checkout config to bump
@@ -79,18 +82,20 @@ sub BumpPatcherConfig {
     my $product = $config->Get(var => 'product');
     my $configBumpDir = $config->Get(var => 'configBumpDir');
     my $version = $config->Get(var => 'version');
     my $oldVersion = $config->Get(var => 'oldVersion');
     my $rc = $config->Get(var => 'rc');
     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.
     my $checkedOutPatcherConfig = catfile($configBumpDir, 'patcher', 
      $patcherConfig);
 
     my $patcherConfigObj = new Config::General(-ConfigFile => 
      $checkedOutPatcherConfig);
@@ -149,55 +154,55 @@ sub BumpPatcherConfig {
     $currentUpdateObj->{'rc'} = {};
     foreach my $c (@{$RELEASE_CANDIDATE_CHANNELS}) {
         $currentUpdateObj->{'rc'}->{$c} = "$rc";
     }
 
     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%';
 
     $partialUpdate->{'path'} = catfile($product, 'nightly', $version . 
                                '-candidates', $rcStr, $product. '-' . 
                                $oldVersion . '-' . $version .
                                '.%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';
 
     $currentUpdateObj->{'partial'} = $partialUpdate;
 
     # 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%';
 
     $completeUpdate->{'path'} = catfile($product, 'nightly', $version . 
      '-candidates', $rcStr, $product . '-' . $version .
      '.%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';
 
     $currentUpdateObj->{'complete'} = $completeUpdate;
 
     # Now, add the new <release> stanza for the release we're working on
 
     my $releaseObj;
@@ -212,17 +217,17 @@ sub BumpPatcherConfig {
 
     # grab os-specific buildID file on FTP
     my $candidateDir = $config->GetFtpCandidateDir(bitsUnsigned => 0);
     foreach my $os ('linux', 'macosx', 'win32') {
         my ($bh, $buildIDTempFile) = tempfile(DIR => '.');
         $bh->close();
         $this->Shell(
           cmd => 'scp',
-          cmdArgs => [$sshUser . '@' . $sshServer . ':' . 
+          cmdArgs => [$stagingUser . '@' . $stagingServer . ':' . 
                       $candidateDir .'/' . $os . '_info.txt',
                       $buildIDTempFile],
         );
         my $buildID;
         open(FILE, "< $buildIDTempFile") || 
          die("Could not open buildID temp file $buildIDTempFile: $!");
         while (<FILE>) {
           my ($var, $value) = split(/\s*=\s*/, $_, 2);
@@ -252,17 +257,17 @@ sub BumpPatcherConfig {
 
     $releaseObj->{'platforms'} = { 'linux-i686' => $linBuildId,
                                    'win32' => $winBuildId,
                                    'mac' => $macBuildId };
 
     $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',
 
     # Compute locale exceptions; 
     # $localeInfo is hash ref of locales -> array of platforms the locale
     # is for.
     #
     # To calculate the exceptions to this rule, create a hash with 
--- a/tools/release/Bootstrap/Step/Repack.pm
+++ b/tools/release/Bootstrap/Step/Repack.pm
@@ -45,16 +45,17 @@ sub Verify {
     my $product = $config->Get(var => 'product');
     my $rc = $config->Get(var => 'rc');
     my $oldRc = $config->Get(var => 'oldRc');
     my $logDir = $config->Get(sysvar => 'logDir');
     my $version = $config->Get(var => 'version');
     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;
 
     # l10n metadiff test
 
     my $verifyDirVersion = catfile($verifyDir, $product . '-' . $version);
 
     MkdirWithPath(dir => $verifyDirVersion)
@@ -77,17 +78,17 @@ sub Verify {
     $this->Shell(
       cmd => 'rsync',
       cmdArgs => ['-Lav', 
                   '-e', 'ssh', 
                   '--include=*.dmg',
                   '--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 . '/',
                  ],
       dir => catfile($verifyDirVersion, 'l10n'),
       logFile => 
         catfile($logDir, 'repack_verify-download_' . $version . '.log'),
       timeout => 3600
     );
@@ -96,17 +97,17 @@ sub Verify {
     $this->Shell(
       cmd => 'rsync',
       cmdArgs => ['-Lav', 
                   '-e', 'ssh', 
                   '--include=*.dmg',
                   '--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 . '/',
                  ],
       dir => catfile($verifyDirVersion, 'l10n'),
       logFile => 
         catfile($logDir, 'repack_verify-download_' . $oldVersion . '.log'),
       timeout => 3600
@@ -163,18 +164,18 @@ sub Verify {
 
 sub Push {
     my $this = shift;
 
     my $config = new Bootstrap::Config();
     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');
     my $pushLog  = catfile($logDir, 'repack_' . $rcTag . '-push-l10n.log');
     
     my $logParser = new MozBuild::TinderLogParse(
         logFile => $buildLog,
     );
@@ -190,24 +191,24 @@ sub Push {
     if ($osFileMatch eq 'win32')  {
       $osFileMatch = 'win';
     } elsif ($osFileMatch eq 'macosx') {
       $osFileMatch = 'mac';
     }
 
     $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',
                   '--exclude=*', 
                   $pushDir, $candidateDir],
       logFile => $pushLog,
     );
 }
--- a/tools/release/Bootstrap/Step/Updates.pm
+++ b/tools/release/Bootstrap/Step/Updates.pm
@@ -207,18 +207,18 @@ sub Push {
     my $this = shift;
 
     my $config = new Bootstrap::Config();
     my $logDir = $config->Get(sysvar => 'logDir');
     my $product = $config->Get(var => 'product');
     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');
 
     my $pushLog = catfile($logDir, 'updates_push.log');
     my $fullUpdateDir = catfile($updateDir, $product . '-' . $version,
                                  'patcher', 'temp', $product, 
                                   $oldVersion . '-' . $version);
@@ -227,17 +227,17 @@ sub Push {
     # push partial mar files up to ftp server
     $this->Shell(
      cmd => 'rsync',
      cmdArgs => ['-av', '-e', 'ssh',
                  '--include=*partial.mar', 
                  '--exclude=*',
                  catfile('ftp', $product, 'nightly', $version . '-candidates', 
                           'rc' . $rc) . '/',
-                 $sshUser . '@' . $sshServer . ':' . $candidateDir],
+                 $stagingUser . '@' . $stagingServer . ':' . $candidateDir],
      dir => $fullUpdateDir,
      logFile => $pushLog,
    );
 
     # push update snippets to AUS server
     my $targetPrefix =  CvsCatfile('/opt','aus2','snippets','staging',
                           strftime("%Y%m%d", localtime) . '-' . 
                           ucfirst($product) . '-' . $version);
--- a/tools/release/bootstrap.cfg.example
+++ b/tools/release/bootstrap.cfg.example
@@ -15,17 +15,17 @@ product         = firefox
 # 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
+logDir          = /builds/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
 tagDir          = /builds/tags
@@ -43,16 +43,20 @@ 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    = 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
 # 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