зеркало из https://github.com/mozilla/pjs.git
automatically sync with stage p=joduinn r=rhelmer
This commit is contained in:
Родитель
e24f79b497
Коммит
b21a369810
|
@ -10,6 +10,7 @@ use POSIX "uname";
|
|||
use File::Copy qw(move);
|
||||
|
||||
use Bootstrap::Util qw(GetLocaleManifest CvsCatfile);
|
||||
use Bootstrap::Util qw(GetFtpNightlyDir);
|
||||
|
||||
# shared static config
|
||||
my %config;
|
||||
|
@ -150,12 +151,10 @@ sub GetFtpCandidateDir {
|
|||
}
|
||||
my $bitsUnsigned = $args{'bitsUnsigned'};
|
||||
|
||||
my $product = $this->Get(var => 'product');
|
||||
my $version = $this->Get(var => 'version');
|
||||
my $rc = $this->Get(var => 'rc');
|
||||
|
||||
my $candidateDir = CvsCatfile('/home', 'ftp', 'pub', $product, 'nightly',
|
||||
$version . '-candidates', 'rc' . $rc ) . '/';
|
||||
my $candidateDir = CvsCatfile(GetFtpNightlyDir(), $version . '-candidates', 'rc' . $rc ) . '/';
|
||||
|
||||
my $osFileMatch = $this->SystemInfo(var => 'osname');
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ package Bootstrap::Step::Build;
|
|||
use File::Temp qw(tempfile);
|
||||
|
||||
use Bootstrap::Step;
|
||||
use Bootstrap::Util qw(CvsCatfile);
|
||||
use Bootstrap::Util qw(CvsCatfile SyncNightlyDirToStaging);
|
||||
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
|
@ -155,6 +155,8 @@ sub Push {
|
|||
$candidateDir],
|
||||
logFile => $pushLog,
|
||||
);
|
||||
|
||||
SyncNightlyDirToStaging();
|
||||
}
|
||||
|
||||
sub Announce {
|
||||
|
@ -241,4 +243,3 @@ sub StoreBuildID() {
|
|||
}
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ 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');
|
||||
|
||||
|
@ -89,6 +88,7 @@ sub BumpPatcherConfig {
|
|||
my $patcherConfig = $config->Get(var => 'patcherConfig');
|
||||
my $stagingUser = $config->Get(var => 'stagingUser');
|
||||
my $stagingServer = $config->Get(var => 'stagingServer');
|
||||
my $externalStagingServer = $config->Get(var => 'externalStagingServer');
|
||||
my $ftpServer = $config->Get(var => 'ftpServer');
|
||||
my $bouncerServer = $config->Get(var => 'bouncerServer');
|
||||
my $logDir = $config->Get(sysvar => 'logDir');
|
||||
|
@ -170,9 +170,9 @@ sub BumpPatcherConfig {
|
|||
'.%locale%.%platform%.partial.mar');
|
||||
|
||||
$partialUpdate->{'betatest-url'} =
|
||||
'http://' . $stagingServer. '/pub/mozilla.org/' . $product. '/nightly/' .
|
||||
$version . '-candidates/' . $rcStr . '/' . $product . '-' . $oldVersion .
|
||||
'-' . $version . '.%locale%.%platform%.partial.mar';
|
||||
'http://' . $externalStagingServer. '/pub/mozilla.org/' . $product .
|
||||
'/nightly/' . $version . '-candidates/' . $rcStr . '/' . $product .
|
||||
'-' . $oldVersion . '-' . $version . '.%locale%.%platform%.partial.mar';
|
||||
|
||||
$partialUpdate->{'beta-url'} =
|
||||
'http://' . $ftpServer . '/pub/mozilla.org/' . $product. '/nightly/' .
|
||||
|
@ -192,9 +192,9 @@ sub BumpPatcherConfig {
|
|||
'.%locale%.%platform%.complete.mar');
|
||||
|
||||
$completeUpdate->{'betatest-url'} =
|
||||
'http://' . $stagingServer . '/pub/mozilla.org/' . $product. '/nightly/' .
|
||||
$version . '-candidates/' . $rcStr . '/' . $product . '-' . $version .
|
||||
'.%locale%.%platform%.complete.mar';
|
||||
'http://' . $externalStagingServer . '/pub/mozilla.org/' . $product .
|
||||
'/nightly/' . $version . '-candidates/' . $rcStr . '/' . $product .
|
||||
'-' . $version . '.%locale%.%platform%.complete.mar';
|
||||
|
||||
$completeUpdate->{'beta-url'} =
|
||||
'http://' . $ftpServer . '/pub/mozilla.org/' . $product. '/nightly/' .
|
||||
|
@ -262,9 +262,9 @@ sub BumpPatcherConfig {
|
|||
$releaseObj->{'locales'} = join(' ', sort (keys(%{$localeInfo})));
|
||||
|
||||
$releaseObj->{'completemarurl'} =
|
||||
'http://' . $stagingServer . '/pub/mozilla.org/' . $product. '/nightly/' .
|
||||
$version . '-candidates/' . $rcStr . '/' . $product . '-'. $version .
|
||||
'.%locale%.%platform%.complete.mar',
|
||||
'http://' . $externalStagingServer . '/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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
package Bootstrap::Step::Repack;
|
||||
use Bootstrap::Step;
|
||||
use Bootstrap::Config;
|
||||
use Bootstrap::Util qw(CvsCatfile);
|
||||
use Bootstrap::Util qw(CvsCatfile SyncNightlyDirToStaging);
|
||||
use MozBuild::Util qw(MkdirWithPath);
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
|
@ -232,6 +232,8 @@ sub Push {
|
|||
$pushDir, $candidateDir],
|
||||
logFile => $pushLog,
|
||||
);
|
||||
|
||||
SyncNightlyDirToStaging();
|
||||
}
|
||||
|
||||
sub Announce {
|
||||
|
|
|
@ -7,6 +7,7 @@ use Bootstrap::Step;
|
|||
use Bootstrap::Config;
|
||||
use File::Copy qw(move);
|
||||
use MozBuild::Util qw(MkdirWithPath);
|
||||
use Bootstrap::Util qw(SyncNightlyDirToStaging);
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
sub Execute {
|
||||
|
@ -88,6 +89,8 @@ sub Push {
|
|||
logFile => catfile($logDir, 'source.log'),
|
||||
dir => catfile($stageDir),
|
||||
);
|
||||
|
||||
SyncNightlyDirToStaging();
|
||||
}
|
||||
|
||||
sub Announce {
|
||||
|
|
|
@ -6,7 +6,7 @@ package Bootstrap::Step::Updates;
|
|||
|
||||
use Bootstrap::Step;
|
||||
use Bootstrap::Config;
|
||||
use Bootstrap::Util qw(CvsCatfile);
|
||||
use Bootstrap::Util qw(CvsCatfile SyncNightlyDirToStaging);
|
||||
|
||||
use File::Find qw(find);
|
||||
use POSIX qw(strftime);
|
||||
|
@ -260,6 +260,8 @@ sub Push {
|
|||
logFile => $pushLog,
|
||||
);
|
||||
}
|
||||
|
||||
SyncNightlyDirToStaging();
|
||||
}
|
||||
|
||||
sub Announce {
|
||||
|
|
|
@ -5,16 +5,17 @@
|
|||
package Bootstrap::Util;
|
||||
|
||||
use File::Temp qw(tempfile tempdir);
|
||||
|
||||
use File::Spec::Functions;
|
||||
use MozBuild::Util qw(RunShellCommand);
|
||||
|
||||
use base qw(Exporter);
|
||||
|
||||
our @EXPORT_OK = qw(CvsCatfile CvsTag
|
||||
GetDiffFileList
|
||||
GetFtpNightlyDir
|
||||
GetLocaleManifest
|
||||
GetBouncerPlatforms GetPatcherPlatforms
|
||||
GetBouncerToPatcherPlatformMap);
|
||||
GetBouncerToPatcherPlatformMap
|
||||
SyncNightlyDirToStaging);
|
||||
|
||||
our($DEFAULT_SHELL_TIMEOUT);
|
||||
|
||||
|
@ -61,6 +62,21 @@ sub GetBouncerPlatforms {
|
|||
return keys(%PLATFORM_MAP);
|
||||
}
|
||||
|
||||
##
|
||||
# GetFtpNightlyDir - construct the FTP path for pushing builds & updates to
|
||||
# returns scalar
|
||||
#
|
||||
# no mandatory arguments
|
||||
##
|
||||
|
||||
sub GetFtpNightlyDir {
|
||||
my $config = new Bootstrap::Config();
|
||||
my $product = $config->Get(var => 'product');
|
||||
|
||||
my $nightlyDir = CvsCatfile('/home', 'ftp', 'pub', $product, 'nightly') . '/';
|
||||
return $nightlyDir;
|
||||
}
|
||||
|
||||
sub GetPatcherPlatforms {
|
||||
return values(%PLATFORM_MAP);
|
||||
}
|
||||
|
@ -270,4 +286,29 @@ sub GetDiffFileList {
|
|||
return \@differentFiles;
|
||||
}
|
||||
|
||||
sub SyncNightlyDirToStaging {
|
||||
my $config = new Bootstrap::Config();
|
||||
my $productTag = $config->Get(var => 'productTag');
|
||||
my $rc = $config->Get(var => 'rc');
|
||||
my $logDir = $config->Get(sysvar => 'logDir');
|
||||
my $externalStagingUser = $config->Get(var => 'externalStagingUser');
|
||||
my $externalStagingServer = $config->Get(var => 'externalStagingServer');
|
||||
|
||||
my $rcTag = $productTag . '_RC' . $rc;
|
||||
my $pushLog = catfile($logDir, 'build_' . $rcTag . '-push.log');
|
||||
my $nightlyDir = $config->GetFtpNightlyDir();
|
||||
|
||||
|
||||
my $command = 'rsync';
|
||||
my @cmdArgs = ('-av', $nightlyDir, $externalStagingUser.'@'.$externalStagingServer.':'.$nightlyDir);
|
||||
print 'Bootstrap::Util::SyncNightlyDirToStaging() Running shell command: '.$command.' '.join(' ', @cmdArgs)."\n";
|
||||
my $rv = RunShellCommand(command => $command,
|
||||
args => \@cmdArgs,
|
||||
redirectStderr => 0,
|
||||
logfile => $pushLog);
|
||||
if ($rv->{'exitValue'} != 0) {
|
||||
die "ASSERT: SyncNightlyDirToStaging(): rsync failed\n";
|
||||
}
|
||||
|
||||
}
|
||||
1;
|
||||
|
|
|
@ -56,6 +56,8 @@ buildTree = MozillaTest
|
|||
# where QA updates/builds go
|
||||
stagingUser = cltbld
|
||||
stagingServer = stage.mozilla.org
|
||||
externalStagingUser = cltbld
|
||||
externalStagingServer = staging-build-console.build.mozilla.org
|
||||
# where beta updates/builds go
|
||||
ftpServer = ftp.mozilla.org
|
||||
# where release updates/builds go
|
||||
|
|
Загрузка…
Ссылка в новой задаче