зеркало из https://github.com/mozilla/gecko-dev.git
implement release steps b=356185 r=preed
This commit is contained in:
Родитель
9b79590b09
Коммит
018285b25c
|
@ -3,18 +3,12 @@
|
|||
#
|
||||
|
||||
package Bootstrap::Step;
|
||||
use MozBuild::Util;
|
||||
use Config::General;
|
||||
use IO::Handle;
|
||||
use MozBuild::Util qw(RunShellCommand);
|
||||
use POSIX qw(strftime);
|
||||
|
||||
my $DEFAULT_TIMEOUT = 3600;
|
||||
|
||||
# shared static config
|
||||
my $conf = new Config::General("bootstrap.cfg");
|
||||
if (not $conf) {
|
||||
die "Config is null!";
|
||||
}
|
||||
|
||||
sub new {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
|
@ -45,13 +39,13 @@ sub Shell {
|
|||
print "Timeout: $timeout\n";
|
||||
|
||||
if ($timeout) {
|
||||
$rv = MozBuild::Util::RunShellCommand(
|
||||
$rv = RunShellCommand(
|
||||
'command' => "$cmd",
|
||||
'timeout' => "$timeout",
|
||||
'logfile' => "$logFile",
|
||||
);
|
||||
} else {
|
||||
$rv = MozBuild::Util::RunShellCommand(
|
||||
$rv = RunShellCommand(
|
||||
'command' => "$cmd",
|
||||
'logfile' => "$logFile",
|
||||
);
|
||||
|
@ -96,22 +90,6 @@ sub Log {
|
|||
print "log: $msg\n";
|
||||
}
|
||||
|
||||
sub Config {
|
||||
my $this = shift;
|
||||
|
||||
my %args = @_;
|
||||
use Data::Dumper;
|
||||
my $var = $args{'var'};
|
||||
|
||||
my %config = $conf->getall();
|
||||
|
||||
if ($config{'app'}{$var}) {
|
||||
return $config{'app'}{$var};
|
||||
} else {
|
||||
die("No such config variable: $var\n");
|
||||
}
|
||||
}
|
||||
|
||||
sub CheckLog {
|
||||
my $this = shift;
|
||||
my %args = @_;
|
||||
|
@ -153,7 +131,6 @@ sub CheckLog {
|
|||
|
||||
sub CurrentTime() {
|
||||
my $this = shift;
|
||||
my $args = @_;
|
||||
|
||||
return strftime("%T %D", localtime());
|
||||
}
|
||||
|
|
|
@ -3,16 +3,19 @@
|
|||
#
|
||||
package Bootstrap::Step::Build;
|
||||
use Bootstrap::Step;
|
||||
use Bootstrap::Config;
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
my $config = new Bootstrap::Config;
|
||||
|
||||
sub Execute {
|
||||
my $this = shift;
|
||||
|
||||
my $buildDir = $this->Config('var' => 'buildDir');
|
||||
my $productTag = $this->Config('var' => 'productTag');
|
||||
my $rc = $this->Config('var' => 'rc');
|
||||
my $buildPlatform = $this->Config('var' => 'buildPlatform');
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $buildDir = $config->Get('var' => 'buildDir');
|
||||
my $productTag = $config->Get('var' => 'productTag');
|
||||
my $rc = $config->Get('var' => 'rc');
|
||||
my $buildPlatform = $config->Get('var' => 'buildPlatform');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
my $rcTag = $productTag . '_RC' . $rc;
|
||||
|
||||
my $lastBuilt = $buildDir . '/' . $buildPlatform . '/last-built';
|
||||
|
@ -33,11 +36,11 @@ sub Execute {
|
|||
sub Verify {
|
||||
my $this = shift;
|
||||
|
||||
my $buildDir = $this->Config('var' => 'buildDir');
|
||||
my $productTag = $this->Config('var' => 'productTag');
|
||||
my $rc = $this->Config('var' => 'rc');
|
||||
my $buildDir = $config->Get('var' => 'buildDir');
|
||||
my $productTag = $config->Get('var' => 'productTag');
|
||||
my $rc = $config->Get('var' => 'rc');
|
||||
my $rcTag = $productTag.'_RC'.$rc;
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
|
||||
my $buildLog = $logDir . '/' . $rcTag . '-build.log';
|
||||
|
||||
|
|
|
@ -4,16 +4,19 @@
|
|||
#
|
||||
package Bootstrap::Step::Repack;
|
||||
use Bootstrap::Step;
|
||||
use Bootstrap::Config;
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
my $config = new Bootstrap::Config;
|
||||
|
||||
sub Execute {
|
||||
my $this = shift;
|
||||
|
||||
my $buildDir = $this->Config('var' => 'l10n-buildDir');
|
||||
my $productTag = $this->Config('var' => 'productTag');
|
||||
my $rc = $this->Config('var' => 'rc');
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $buildPlatform = $this->Config('var' => 'buildPlatform');
|
||||
my $buildDir = $config->Get('var' => 'l10n_buildDir');
|
||||
my $productTag = $config->Get('var' => 'productTag');
|
||||
my $rc = $config->Get('var' => 'rc');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
my $buildPlatform = $config->Get('var' => 'buildPlatform');
|
||||
my $rcTag = $productTag . '_RC' . $rc;
|
||||
|
||||
my $buildLog = $logDir . '/' . $rcTag . '-build-l10n.log';
|
||||
|
@ -33,11 +36,11 @@ sub Execute {
|
|||
sub Verify {
|
||||
my $this = shift;
|
||||
|
||||
my $buildDir = $this->Config('var' => 'buildDir');
|
||||
my $productTag = $this->Config('var' => 'productTag');
|
||||
my $rc = $this->Config('var' => 'rc');
|
||||
my $buildDir = $config->Get('var' => 'buildDir');
|
||||
my $productTag = $config->Get('var' => 'productTag');
|
||||
my $rc = $config->Get('var' => 'rc');
|
||||
my $rcTag = $productTag.'_RC'.$rc;
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
|
||||
my $buildLog = $logDir . '/' . $rcTag . '-build.log';
|
||||
|
||||
|
|
|
@ -3,16 +3,29 @@
|
|||
#
|
||||
package Bootstrap::Step::Sign;
|
||||
use Bootstrap::Step;
|
||||
use Bootstrap::Config;
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
my $config = new Bootstrap::Config;
|
||||
|
||||
sub Execute {
|
||||
my $this = shift;
|
||||
$this->Shell('cmd' => 'echo sign');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
|
||||
$this->Shell(
|
||||
'cmd' => 'echo sign',
|
||||
'logFile' => $logDir . '/sign.log',
|
||||
);
|
||||
}
|
||||
|
||||
sub Verify {
|
||||
my $this = shift;
|
||||
$this->Shell('cmd' => 'echo Verify sign');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
|
||||
$this->Shell(
|
||||
'cmd' => 'echo Verify sign',
|
||||
'logFile' => $logDir . '/verify-sign.log',
|
||||
);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -4,26 +4,30 @@
|
|||
#
|
||||
package Bootstrap::Step::Source;
|
||||
use Bootstrap::Step;
|
||||
use File::Copy;
|
||||
use MozBuild::Util;
|
||||
use Bootstrap::Config;
|
||||
use File::Copy qw(move);
|
||||
use MozBuild::Util qw(MkdirWithPath);
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
my $config = new Bootstrap::Config;
|
||||
|
||||
sub Execute {
|
||||
my $this = shift;
|
||||
|
||||
my $product = $this->Config('var' => 'product');
|
||||
my $productTag = $this->Config('var' => 'productTag');
|
||||
my $version = $this->Config('var' => 'version');
|
||||
my $rc = $this->Config('var' => 'rc');
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $stageHome = $this->Config('var' => 'stageHome');
|
||||
my $product = $config->Get('var' => 'product');
|
||||
my $productTag = $config->Get('var' => 'productTag');
|
||||
my $version = $config->Get('var' => 'version');
|
||||
my $rc = $config->Get('var' => 'rc');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
my $stageHome = $config->Get('var' => 'stageHome');
|
||||
|
||||
# create staging area
|
||||
my $stageDir =
|
||||
$stageHome . '/' . $product . '-' . $version . '/batch-source/rc' . $rc;
|
||||
|
||||
if (not -d $stageDir) {
|
||||
MkdirWithPath('dir' => $stageDir) or die "Cannot create $stageDir: $!";
|
||||
MkdirWithPath('dir' => $stageDir)
|
||||
or die "Cannot create $stageDir: $!";
|
||||
}
|
||||
|
||||
$this->Shell(
|
||||
|
@ -32,7 +36,7 @@ sub Execute {
|
|||
'logFile' => $logDir . '/source.log',
|
||||
);
|
||||
|
||||
File::Copy::move("$stageDir/../*.bz2", $stageDir);
|
||||
move("$stageDir/../*.bz2", $stageDir);
|
||||
chmod(0644, glob("$stageDir/*.bz2"));
|
||||
|
||||
# $this->Shell(
|
||||
|
|
|
@ -4,19 +4,22 @@
|
|||
#
|
||||
package Bootstrap::Step::Stage;
|
||||
use Bootstrap::Step;
|
||||
use File::Copy;
|
||||
use File::Find;
|
||||
use MozBuild::Util;
|
||||
use Bootstrap::Config;
|
||||
use File::Copy qw(copy move);
|
||||
use File::Find qw(find);
|
||||
use MozBuild::Util qw(MkdirWithPath);
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
my $config = new Bootstrap::Config;
|
||||
|
||||
sub Execute {
|
||||
my $this = shift;
|
||||
|
||||
my $product = $this->Config('var' => 'product');
|
||||
my $version = $this->Config('var' => 'version');
|
||||
my $rc = $this->Config('var' => 'rc');
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $stageHome = $this->Config('var' => 'stageHome');
|
||||
my $product = $config->Get('var' => 'product');
|
||||
my $version = $config->Get('var' => 'version');
|
||||
my $rc = $config->Get('var' => 'rc');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
my $stageHome = $config->Get('var' => 'stageHome');
|
||||
|
||||
## Prepare the staging directory for the release.
|
||||
# Create the staging directory.
|
||||
|
@ -32,7 +35,8 @@ sub Execute {
|
|||
# Create skeleton batch directory.
|
||||
my $skelDir = "$stageDir/batch-skel/stage";
|
||||
if (not -d "$skelDir") {
|
||||
MkdirWithPath('dir' => $skelDir) or die "Cannot create $stageDir: $!";
|
||||
MkdirWithPath('dir' => $skelDir)
|
||||
or die "Cannot create $stageDir: $!";
|
||||
}
|
||||
|
||||
# Create the contrib and contrib-localized directories with expected
|
||||
|
@ -42,18 +46,20 @@ sub Execute {
|
|||
or die "Could not mkdir $skelDir/contrib: $!";
|
||||
}
|
||||
|
||||
my ($pwname, $pass, $uid) = getpwnam('cltbld')
|
||||
or die "Could not getpwname for cltbld: $!";
|
||||
my ($grname, $passwd, $gid) = getgrnam($product)
|
||||
my (undef, undef, $gid) = getgrnam($product)
|
||||
or die "Could not getgrname for $product: $!";
|
||||
|
||||
my @dir = ("$skelDir/contrib");
|
||||
chmod('2775', @dir)
|
||||
my $dir = "$skelDir/contrib";
|
||||
chmod(oct(2775), $dir)
|
||||
or die "Cannot change mode on $skelDir/contrib to 2775: $!";
|
||||
$this->Log('msg' => "Changed mode of $dir to 2775");
|
||||
chown(-1, $gid, $dir)
|
||||
or die "Cannot chgrp $skelDir/contrib to $product: $!";
|
||||
$this->Log('msg' => "Changed group of $dir to $product");
|
||||
|
||||
# NOTE - should have a standard "master" copy somewhere else
|
||||
# Copy the KEY file from the previous release directory.
|
||||
File::Copy::copy("$product/releases/1.5/KEY", "$skelDir/");
|
||||
copy("$product/releases/1.5/KEY", "$skelDir/");
|
||||
|
||||
## Prepare the merging directory.
|
||||
$this->Shell(
|
||||
|
@ -83,7 +89,7 @@ sub Execute {
|
|||
);
|
||||
|
||||
# Remove unshipped files and set proper mode on dirs
|
||||
File::Find::find(\&TrimCallback, $stageDir . '/batch1/prestage-trimmed/');
|
||||
find(&TrimCallback, $stageDir . '/batch1/prestage-trimmed/');
|
||||
|
||||
$this->Shell(
|
||||
'cmd' => 'rsync -Lav prestage-trimmed/ stage/',
|
||||
|
@ -96,31 +102,31 @@ sub Execute {
|
|||
# TODO should support --long filenames, for e.g. Alpha and Beta
|
||||
$this->Shell(
|
||||
'cmd' => $stageHome . '/bin/groom-files --short=' . $version . ' .',
|
||||
'logFile' => $logDir . '/groom-files.log',
|
||||
'logFile' => $logDir . '/stage-groom_files.log',
|
||||
'dir' => $stageDir . '/batch1/stage',
|
||||
);
|
||||
|
||||
# fix xpi dir names
|
||||
File::Copy::move("$stageDir/batch1/stage/linux-xpi",
|
||||
move("$stageDir/batch1/stage/linux-xpi",
|
||||
"$stageDir/batch1/stage/linux-i686/xpi")
|
||||
or die "Cannot rename $stageDir/batch1/stage/linux-xpi $stageDir/batch1/stage/linux-i686/xpi: $!";
|
||||
File::Copy::move("$stageDir/batch1/stage/windows-xpi",
|
||||
or die('msg' => "Cannot rename $stageDir/batch1/stage/linux-xpi $stageDir/batch1/stage/linux-i686/xpi: $!");
|
||||
move("$stageDir/batch1/stage/windows-xpi",
|
||||
"$stageDir/batch1/stage/win32/xpi")
|
||||
or die "Cannot rename $stageDir/batch1/stage/windows-xpi $stageDir/batch1/stage/win32/xpi: $!";
|
||||
File::Copy::move("$stageDir/batch1/stage/mac-xpi",
|
||||
or die('msg' => "Cannot rename $stageDir/batch1/stage/windows-xpi $stageDir/batch1/stage/win32/xpi: $!");
|
||||
move("$stageDir/batch1/stage/mac-xpi",
|
||||
"$stageDir/batch1/stage/mac/xpi")
|
||||
or die "Cannot rename $stageDir/batch1/stage/mac-xpi $stageDir/batch1/stage/mac/xpi: $!";
|
||||
or die('msg' => "Cannot rename $stageDir/batch1/stage/mac-xpi $stageDir/batch1/stage/mac/xpi: $!");
|
||||
}
|
||||
|
||||
sub Verify {
|
||||
my $this = shift;
|
||||
|
||||
my $product = $this->Config('var' => 'product');
|
||||
my $appName = $this->Config('var' => 'appName');
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $version = $this->Config('var' => 'version');
|
||||
my $rc = $this->Config('var' => 'rc');
|
||||
my $stageHome = $this->Config('var' => 'stageHome');
|
||||
my $product = $config->Get('var' => 'product');
|
||||
my $appName = $config->Get('var' => 'appName');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
my $version = $config->Get('var' => 'version');
|
||||
my $rc = $config->Get('var' => 'rc');
|
||||
my $stageHome = $config->Get('var' => 'stageHome');
|
||||
|
||||
## Prepare the staging directory for the release.
|
||||
# Create the staging directory.
|
||||
|
@ -135,8 +141,12 @@ sub Verify {
|
|||
);
|
||||
}
|
||||
|
||||
sub TrimCallback {
|
||||
sub TrimCallback {
|
||||
my $dirent = $File::Find::name;
|
||||
|
||||
my (undef, undef, $gid) = getgrnam($product)
|
||||
or die "Could not getgrname for $product: $!";
|
||||
|
||||
if (-f $dirent) {
|
||||
if (($dirent =~ /xforms\.xpi/) ||
|
||||
# ja-JP-mac is the JA locale for mac, do not ship ja
|
||||
|
@ -152,11 +162,20 @@ sub TrimCallback {
|
|||
($dirent =~ /en-US\.xpi$/)) {
|
||||
unlink($dirent) || die "Could not unlink $dirent: $!";
|
||||
$this->Log('msg' => "Unlinked $dirent");
|
||||
}
|
||||
} else {
|
||||
chmod(0644, $dirent)
|
||||
|| die "Could not chmod $dirent to 0644: $!";
|
||||
$this->Log('msg' => "Changed mode of $dirent to 0644");
|
||||
} else {
|
||||
chmod(0644, $dirent)
|
||||
|| die "Could not chmod $dirent to 0644: $!";
|
||||
$this->Log('msg' => "Changed mode of $dirent to 0644");
|
||||
}
|
||||
} elsif (-d $dirent) {
|
||||
chown(-1, $gid, $dirent)
|
||||
or die "Cannot chgrp $dirent to $product: $!";
|
||||
$this->Log('msg' => "Changed group of $dirent to $product");
|
||||
chmod(0755, $dirent)
|
||||
or die "Could not chmod $dirent to 0755: $!";
|
||||
$this->Log('msg' => "Changed mode of $dirent to 0755");
|
||||
} else {
|
||||
die("Unexpected non-file/non-dir directory entry: $dirent");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,25 +3,28 @@
|
|||
#
|
||||
package Bootstrap::Step::Tag;
|
||||
use Bootstrap::Step;
|
||||
use File::Copy;
|
||||
use MozBuild::Util;
|
||||
use Bootstrap::Config;
|
||||
use File::Copy qw(move);
|
||||
use MozBuild::Util qw(MkdirWithPath);
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
my $config = new Bootstrap::Config;
|
||||
|
||||
sub Execute {
|
||||
my $this = shift;
|
||||
|
||||
my $product = $this->Config('var' => 'product');
|
||||
my $productTag = $this->Config('var' => 'productTag');
|
||||
my $branchTag = $this->Config('var' => 'branchTag');
|
||||
my $pullDate = $this->Config('var' => 'pullDate');
|
||||
my $rc = $this->Config('var' => 'rc');
|
||||
my $version = $this->Config('var' => 'version');
|
||||
my $appName = $this->Config('var' => 'appName');
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $mozillaCvsroot = $this->Config('var' => 'mozillaCvsroot');
|
||||
my $l10nCvsroot = $this->Config('var' => 'l10nCvsroot');
|
||||
my $mofoCvsroot = $this->Config('var' => 'mofoCvsroot');
|
||||
my $tagDir = $this->Config('var' => 'tagDir');
|
||||
my $product = $config->Get('var' => 'product');
|
||||
my $productTag = $config->Get('var' => 'productTag');
|
||||
my $branchTag = $config->Get('var' => 'branchTag');
|
||||
my $pullDate = $config->Get('var' => 'pullDate');
|
||||
my $rc = $config->Get('var' => 'rc');
|
||||
my $version = $config->Get('var' => 'version');
|
||||
my $appName = $config->Get('var' => 'appName');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
my $mozillaCvsroot = $config->Get('var' => 'mozillaCvsroot');
|
||||
my $l10nCvsroot = $config->Get('var' => 'l10nCvsroot');
|
||||
my $mofoCvsroot = $config->Get('var' => 'mofoCvsroot');
|
||||
my $tagDir = $config->Get('var' => 'tagDir');
|
||||
|
||||
my $releaseTag = $productTag.'_RELEASE';
|
||||
my $rcTag = $productTag.'_RC'.$rc;
|
||||
|
@ -67,7 +70,7 @@ sub Execute {
|
|||
);
|
||||
|
||||
# Create the RELEASE tag
|
||||
$this->_CvsTag(
|
||||
$this->CvsTag(
|
||||
'tagName' => $releaseTag,
|
||||
'coDir' => $releaseTagDir . '/cvsroot/mozilla',
|
||||
'timeout' => '3600',
|
||||
|
@ -75,7 +78,7 @@ sub Execute {
|
|||
);
|
||||
|
||||
# Create the RC tag
|
||||
$this->_CvsTag(
|
||||
$this->CvsTag(
|
||||
'tagName' => $rcTag,
|
||||
'coDir' => $releaseTagDir . '/cvsroot/mozilla',
|
||||
'timeout' => '3600',
|
||||
|
@ -84,10 +87,10 @@ sub Execute {
|
|||
|
||||
# Create a minibranch for the pull scripts so we can change them without
|
||||
# changing anything on the original branch.
|
||||
$this->_CvsTag(
|
||||
$this->CvsTag(
|
||||
'tagName' => $minibranchTag,
|
||||
'branch' => '1',
|
||||
'files' => 'client.mk',
|
||||
'files' => ['client.mk'],
|
||||
'coDir' => $releaseTagDir . '/cvsroot/mozilla',
|
||||
'logFile' => $logDir . '/cvsroot_tag-' . $minibranchTag. '.log',
|
||||
);
|
||||
|
@ -109,7 +112,7 @@ sub Execute {
|
|||
close INFILE;
|
||||
close OUTFILE;
|
||||
|
||||
if (not File::Copy::move("$releaseTagDir/cvsroot/mozilla/client.mk.tmp",
|
||||
if (not move("$releaseTagDir/cvsroot/mozilla/client.mk.tmp",
|
||||
"$releaseTagDir/cvsroot/mozilla/client.mk")) {
|
||||
die "Cannot rename $releaseTagDir/cvsroot/mozilla/client.mk.tmp to $releaseTagDir/cvsroot/mozilla/client.mk";
|
||||
}
|
||||
|
@ -129,19 +132,19 @@ sub Execute {
|
|||
);
|
||||
|
||||
# Move the release tag onto the modified version of the pull scripts.
|
||||
$this->_CvsTag(
|
||||
$this->CvsTag(
|
||||
'tagName' => $releaseTag,
|
||||
'force' => '1',
|
||||
'files' => 'client.mk',
|
||||
'files' => ['client.mk'],
|
||||
'coDir' => $releaseTagDir . '/cvsroot/mozilla',
|
||||
'logFile' => $logDir . '/cvsroot_clientmk_tag-' . $releaseTag. '.log',
|
||||
);
|
||||
|
||||
# Move the RC tag onto the modified version of the pull scripts.
|
||||
$this->_CvsTag(
|
||||
$this->CvsTag(
|
||||
'tagName' => $rcTag,
|
||||
'force' => '1',
|
||||
'files' => 'client.mk',
|
||||
'files' => ['client.mk'],
|
||||
'coDir' => $releaseTagDir . '/cvsroot/mozilla',
|
||||
'logFile' => $logDir . '/cvsroot_clientmk_tag-' . $rcTag. '.log',
|
||||
);
|
||||
|
@ -160,7 +163,7 @@ sub Execute {
|
|||
);
|
||||
|
||||
# Create the talkback RELEASE tag.
|
||||
$this->_CvsTag(
|
||||
$this->CvsTag(
|
||||
'tagName' => $releaseTag,
|
||||
'coDir' => $releaseTagDir . '/mofo/talkback/fullsoft',
|
||||
'logFile' => $logDir . '/mofo_tag-' . $releaseTag. '.log',
|
||||
|
@ -196,14 +199,14 @@ sub Execute {
|
|||
}
|
||||
|
||||
# Create the l10n RELEASE tag.
|
||||
$this->_CvsTag(
|
||||
$this->CvsTag(
|
||||
'tagName' => $releaseTag,
|
||||
'coDir' => $releaseTagDir . '/l10n/l10n',
|
||||
'logFile' => $logDir . '/l10n_tag-' . $releaseTag. '.log',
|
||||
);
|
||||
|
||||
# Create the RC tag.
|
||||
$this->_CvsTag(
|
||||
$this->CvsTag(
|
||||
'tagName' => $rcTag,
|
||||
'coDir' => $releaseTagDir . '/l10n/l10n',
|
||||
'logFile' => $logDir . '/l10n_tag-' . $rcTag. '.log',
|
||||
|
@ -212,11 +215,11 @@ sub Execute {
|
|||
|
||||
sub Verify {
|
||||
my $this = shift;
|
||||
# XXX temp disable
|
||||
# TODO - independently verify that tag was applied
|
||||
#$this->Shell('cmd' => 'echo Verify tag');
|
||||
}
|
||||
|
||||
sub _CvsTag {
|
||||
sub CvsTag {
|
||||
my $this = shift;
|
||||
my %args = @_;
|
||||
|
||||
|
@ -227,30 +230,27 @@ sub _CvsTag {
|
|||
my $force = $args{'force'};
|
||||
my $logFile = $args{'logFile'};
|
||||
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
|
||||
my $cmd;
|
||||
my $cvsCommand = 'cvs tag';
|
||||
my $checkForOnly = '^T ';
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
|
||||
# only force or branch specific files, not the whole tree
|
||||
if ($branch and $files) {
|
||||
$cmd = $cvsCommand . ' -b ' . $tagName . ' ' . $files;
|
||||
$checkForOnly = '^B ';
|
||||
} elsif ($force and $files) {
|
||||
$cmd = $cvsCommand . ' -F ' . $tagName . ' ' . $files;
|
||||
} else {
|
||||
die("Must specify files if branch or force option is used.");
|
||||
if ($force and scalar(@{$files}) <= 0 ) {
|
||||
die("ASSERT: Cannot specify force without files");
|
||||
} elsif ($branch and scalar(@{$files}) <= 0) {
|
||||
die("ASSERT: Cannot specify branch without files");
|
||||
} elsif ($branch and $force) {
|
||||
die("ASSERT: Cannot specify both branch and force");
|
||||
} elsif (not $tagName) {
|
||||
die("ASSERT: tagName must be specified");
|
||||
} elsif (not $logFile) {
|
||||
die("ASSERT: logFile must be specified");
|
||||
}
|
||||
|
||||
# regular tags can be applied to specific files or the whole tree
|
||||
# if no files are specified.
|
||||
if ($files) {
|
||||
$cmd = $cvsCommand . ' ' . $tagName . $files;
|
||||
} else {
|
||||
$cmd = $cvsCommand . ' ' . $tagName;
|
||||
}
|
||||
|
||||
my $cmd = 'cvs -q tag';
|
||||
$cmd .= ' -F ' if ($force);
|
||||
$cmd .= ' -b ' if ($branch);
|
||||
$cmd .= ' ' . $tagName;
|
||||
$cmd .= ' ' . join(' ', @{$files}) if (defined($files));
|
||||
|
||||
$this->Shell(
|
||||
'cmd' => $cmd,
|
||||
'dir' => $coDir,
|
||||
|
@ -258,10 +258,10 @@ sub _CvsTag {
|
|||
'logFile' => $logFile,
|
||||
);
|
||||
|
||||
# $this->CheckLog(
|
||||
# 'log' => $logFile,
|
||||
# 'checkForOnly' => $checkForOnly,
|
||||
# );
|
||||
$this->CheckLog(
|
||||
'log' => $logFile,
|
||||
'checkForOnly' => '^T ',
|
||||
);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -4,24 +4,28 @@
|
|||
#
|
||||
package Bootstrap::Step::Updates;
|
||||
use Bootstrap::Step;
|
||||
use File::Find;
|
||||
use MozBuild::Util;
|
||||
use Bootstrap::Config;
|
||||
use File::Find qw(find);
|
||||
use MozBuild::Util qw(MkdirWithPath);
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
my $config = new Bootstrap::Config;
|
||||
|
||||
sub Execute {
|
||||
my $this = shift;
|
||||
|
||||
my $product = $this->Config('var' => 'product');
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $version = $this->Config('var' => 'version');
|
||||
my $mozillaCvsroot = $this->Config('var' => 'mozillaCvsroot');
|
||||
my $mofoCvsroot = $this->Config('var' => 'mofoCvsroot');
|
||||
my $updateDir = $this->Config('var' => 'updateDir');
|
||||
my $patcherConfig = $this->Config('var' => 'patcherConfig');
|
||||
my $product = $config->Get('var' => 'product');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
my $version = $config->Get('var' => 'version');
|
||||
my $mozillaCvsroot = $config->Get('var' => 'mozillaCvsroot');
|
||||
my $mofoCvsroot = $config->Get('var' => 'mofoCvsroot');
|
||||
my $updateDir = $config->Get('var' => 'updateDir');
|
||||
my $patcherConfig = $config->Get('var' => 'patcherConfig');
|
||||
|
||||
# Create updates area.
|
||||
if (not -d $updateDir) {
|
||||
MkdirWithPath('dir' => $updateDir) or die "Cannot mkdir $updateDir: $!";
|
||||
MkdirWithPath('dir' => $updateDir)
|
||||
or die "Cannot mkdir $updateDir: $!";
|
||||
}
|
||||
|
||||
$this->Shell(
|
||||
|
@ -86,21 +90,22 @@ sub Execute {
|
|||
sub Verify {
|
||||
my $this = shift;
|
||||
|
||||
my $logDir = $this->Config('var' => 'logDir');
|
||||
my $version = $this->Config('var' => 'version');
|
||||
my $oldVersion = $this->Config('var' => 'oldVersion');
|
||||
my $mozillaCvsroot = $this->Config('var' => 'mozillaCvsroot');
|
||||
my $updateDir = $this->Config('var' => 'updateDir');
|
||||
my $verifyDir = $this->Config('var' => 'verifyDir');
|
||||
my $logDir = $config->Get('var' => 'logDir');
|
||||
my $version = $config->Get('var' => 'version');
|
||||
my $oldVersion = $config->Get('var' => 'oldVersion');
|
||||
my $mozillaCvsroot = $config->Get('var' => 'mozillaCvsroot');
|
||||
my $updateDir = $config->Get('var' => 'updateDir');
|
||||
my $verifyDir = $config->Get('var' => 'verifyDir');
|
||||
my $product = $config->Get('var' => 'product');
|
||||
|
||||
### quick verification
|
||||
# ensure that there are only test channels
|
||||
my $testDir = $verifyDir . '/' . $version . '-updates/patcher/temp/' . $product . $oldVersion . '-' . $version . '/aus2.test';
|
||||
my $testDir = $updateDir . '/patcher/temp/' . $product . '/' . $oldVersion . '-' . $version . '/aus2.test';
|
||||
|
||||
File::Find::find(\&TestAusCallback, $testDir);
|
||||
|
||||
# Create verification area.
|
||||
my $verifyDirVersion = $verifyDir . $version;
|
||||
my $verifyDirVersion = $verifyDir . '/' . $version;
|
||||
MkdirWithPath('dir' => $verifyDirVersion)
|
||||
or die("Could not mkdir $verifyDirVersion: $!");
|
||||
|
||||
|
@ -127,8 +132,10 @@ sub Verify {
|
|||
|
||||
sub TestAusCallback {
|
||||
my $dir = $File::Find::name;
|
||||
if ($dir =~ /test/) {
|
||||
die("Non-test directory found in $testDir/aus2.test: $dir");
|
||||
if (($dir =~ /beta/) or ($dir =~ /release/)) {
|
||||
if (not $dir =~ /test/) {
|
||||
die("Non-test directory found in $testDir/aus2.test: $dir");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Use "release -h" for help.
|
|||
Pre-flight Checklist
|
||||
-----------------
|
||||
There are a number of manual steps that must be performed, so a default
|
||||
end-to-end run will generally not work.
|
||||
end-to-end run will not (yet) work.
|
||||
|
||||
Before any steps:
|
||||
|
||||
|
@ -20,7 +20,7 @@ After Build and Repack steps:
|
|||
|
||||
* rsync builds to candidates dir
|
||||
|
||||
After the Update step:
|
||||
After Update step:
|
||||
|
||||
* edit patcher config
|
||||
* edit mozilla/testing/release/updates/updates.cfg
|
||||
|
@ -41,18 +41,10 @@ Steps
|
|||
-----------------
|
||||
1) Tag
|
||||
2) Build
|
||||
2.1) Push
|
||||
2.2) Announce
|
||||
3) Source
|
||||
4) Repack
|
||||
4.1) Push
|
||||
4.2) Announce
|
||||
5) Updates
|
||||
5.1) Push
|
||||
5.2) Announce
|
||||
6) Stage
|
||||
6.1) Merge
|
||||
6.2) Announce
|
||||
7) Sign
|
||||
|
||||
Details
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
<app>
|
||||
productTag = FIREFOX_1_6_0_7
|
||||
branchTag = MOZILLA_1_8_0_BRANCH
|
||||
pullDate = 2006-11-03 12:00 PDT
|
||||
rc = 1
|
||||
version = 1.6.0.7
|
||||
oldVersion = 1.5.0.7
|
||||
appName = browser
|
||||
product = firefox
|
||||
buildDir = /builds/tinderbox/Fx-Mozilla1.8.0-Release
|
||||
l10n-buildDir = /builds/tinderbox/Fx-Mozilla1.8.0-l10n-Release
|
||||
pushDate = 2006-10-30-22
|
||||
logDir = /builds/release/logs
|
||||
mozillaCvsroot = /builds/cvsmirror/cvsroot
|
||||
l10nCvsroot = /builds/cvsmirror/l10n
|
||||
mofoCvsroot = /builds/cvsmirror/mofo
|
||||
stageHome = /data/cltbld
|
||||
updateDir = /builds/updates
|
||||
verifyDir = /builds/verify
|
||||
patcherConfig = moz180-branch-patcher2.cfg
|
||||
tagDir = /builds/tags
|
||||
buildPlatform = Linux_2.4.21-37.EL_Depend
|
||||
</app>
|
||||
productTag = FIREFOX_1_5_0_9
|
||||
branchTag = MOZILLA_1_8_0_BRANCH
|
||||
pullDate = 2006-11-28 16:30 PDT
|
||||
rc = 1
|
||||
version = 1.5.0.9
|
||||
oldVersion = 1.5.0.8
|
||||
appName = browser
|
||||
product = firefox
|
||||
buildDir = /builds/tinderbox/Fx-Mozilla1.8.0-Release
|
||||
l10n_buildDir = /builds/tinderbox/Fx-Mozilla1.8.0-l10n-Release
|
||||
logDir = /builds/release/logs
|
||||
mozillaCvsroot = /builds/cvsmirror/cvsroot
|
||||
l10nCvsroot = /builds/cvsmirror/l10n
|
||||
mofoCvsroot = /builds/cvsmirror/mofo
|
||||
stageHome = /data/cltbld
|
||||
updateDir = /builds/updates
|
||||
verifyDir = /builds/verify
|
||||
patcherConfig = moz180-branch-patcher2.cfg
|
||||
tagDir = /builds/tags
|
||||
buildPlatform = Linux_2.4.21-37.EL_Depend
|
||||
|
|
|
@ -10,7 +10,6 @@ use Bootstrap::Step::Repack;
|
|||
use Bootstrap::Step::Updates;
|
||||
use Bootstrap::Step::Stage;
|
||||
use Bootstrap::Step::Sign;
|
||||
use Bootstrap::Step::Release;
|
||||
|
||||
my @allSteps = (
|
||||
'Tag',
|
||||
|
@ -20,7 +19,6 @@ my @allSteps = (
|
|||
'Updates',
|
||||
'Stage',
|
||||
'Sign',
|
||||
'Release',
|
||||
);
|
||||
|
||||
my %config;
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
package t::Bootstrap::Step::Dummy;
|
||||
use Bootstrap::Step;
|
||||
use Bootstrap::Config;
|
||||
@ISA = ("Bootstrap::Step");
|
||||
|
||||
my $config = new Bootstrap::Config;
|
||||
|
||||
sub Execute {
|
||||
my $this = shift;
|
||||
|
||||
my $productTag = $this->Config('var' => 'productTag');
|
||||
my $productTag = $config->Get('var' => 'productTag');
|
||||
|
||||
if (not $productTag) {
|
||||
print("testfailed, could not get productTag var from Config: $!\n");
|
||||
|
|
|
@ -9,3 +9,4 @@ Verify tag
|
|||
Verify tag
|
||||
Verify tag
|
||||
Verify tag
|
||||
Verify tag
|
||||
|
|
Загрузка…
Ссылка в новой задаче