Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
merge default -> production-0.8
Browse files Browse the repository at this point in the history
--HG--
branch : production-0.8
  • Loading branch information
escapewindow committed Feb 8, 2012
2 parents cae0370 + ff3c22c commit 6998c14
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 51 deletions.
19 changes: 7 additions & 12 deletions misc.py
Expand Up @@ -1172,26 +1172,21 @@ def generateBranchObjects(config, name, secrets=None):
triggeredSchedulers=None triggeredSchedulers=None
if config['enable_l10n'] and pf.get('is_mobile_l10n') and pf.get('l10n_chunks'): if config['enable_l10n'] and pf.get('is_mobile_l10n') and pf.get('l10n_chunks'):
mobile_l10n_scheduler_name = '%s-%s-l10n' % (name, platform) mobile_l10n_scheduler_name = '%s-%s-l10n' % (name, platform)
builder_env = platform_env.copy()
builder_env.update({
'BUILDBOT_CONFIGS': '%s%s' % (config['hgurl'],
config['config_repo_path']),
'CLOBBERER_URL': config['base_clobber_url'],
})
mobile_l10n_builders = [] mobile_l10n_builders = []
builder_env = platform_env.copy()
for n in range(1, int(pf['l10n_chunks']) + 1): for n in range(1, int(pf['l10n_chunks']) + 1):
builddir='%s-%s-l10n_%s' % (name, platform, str(n)) builddir='%s-%s-l10n_%s' % (name, platform, str(n))
builderName = "%s l10n nightly %s/%s" % \ builderName = "%s l10n nightly %s/%s" % \
(pf['base_name'], n, pf['l10n_chunks']) (pf['base_name'], n, pf['l10n_chunks'])
mobile_l10n_builders.append(builderName) mobile_l10n_builders.append(builderName)
factory = ScriptFactory( factory = ScriptFactory(
scriptRepo='%s%s' % (config['hgurl'], scriptRepo='%s%s' % (config['hgurl'],
config['build_tools_repo_path']), config['mozharness_repo_path']),
interpreter='bash', scriptName='scripts/mobile_l10n.py',
scriptName='scripts/l10n/nightly_mobile_repacks.sh', extra_args=['--cfg',
extra_args=[platform, stage_platform, 'single_locale/%s_%s.py' % (name, platform),
getRealpath('localconfig.py'), '--total-chunks', str(pf['l10n_chunks']),
str(pf['l10n_chunks']), str(n)] '--this-chunk', str(n)]
) )
slavebuilddir = reallyShort(builddir) slavebuilddir = reallyShort(builddir)
branchObjects['builders'].append({ branchObjects['builders'].append({
Expand Down
60 changes: 31 additions & 29 deletions process/factory.py
Expand Up @@ -4830,15 +4830,15 @@ def __init__(self, cvsroot, patcherToolsTag, patcherConfig, verifyConfigs,
appName, productName, appName, productName,
version, appVersion, baseTag, buildNumber, version, appVersion, baseTag, buildNumber,
oldVersion, oldAppVersion, oldBaseTag, oldBuildNumber, oldVersion, oldAppVersion, oldBaseTag, oldBuildNumber,
ftpServer, bouncerServer, stagingServer, useBetaChannel, ftpServer, bouncerServer, stagingServer,
stageUsername, stageSshKey, ausUser, ausSshKey, ausHost, stageUsername, stageSshKey, ausUser, ausSshKey, ausHost,
ausServerUrl, hgSshKey, hgUsername, commitPatcherConfig=True, ausServerUrl, hgSshKey, hgUsername, releaseChannel='release',
mozRepoPath=None, oldRepoPath=None, brandName=None, commitPatcherConfig=True, mozRepoPath=None, oldRepoPath=None,
buildSpace=22, triggerSchedulers=None, releaseNotesUrl=None, brandName=None, buildSpace=22, triggerSchedulers=None,
binaryName=None, oldBinaryName=None, testOlderPartials=False, releaseNotesUrl=None, binaryName=None, oldBinaryName=None,
fakeMacInfoTxt=False, longVersion=None, oldLongVersion=None, testOlderPartials=False, fakeMacInfoTxt=False,
schema=None, useBetaChannelForRelease=False, longVersion=None, oldLongVersion=None, schema=None,
useChecksums=False, **kwargs): useBetaChannelForRelease=False, useChecksums=False, **kwargs):
"""cvsroot: The CVSROOT to use when pulling patcher, patcher-configs, """cvsroot: The CVSROOT to use when pulling patcher, patcher-configs,
Bootstrap/Util.pm, and MozBuild. It is also used when Bootstrap/Util.pm, and MozBuild. It is also used when
commiting the version-bumped patcher config so it must have commiting the version-bumped patcher config so it must have
Expand Down Expand Up @@ -4885,7 +4885,6 @@ def __init__(self, cvsroot, patcherToolsTag, patcherConfig, verifyConfigs,
self.ftpServer = ftpServer self.ftpServer = ftpServer
self.bouncerServer = bouncerServer self.bouncerServer = bouncerServer
self.stagingServer = stagingServer self.stagingServer = stagingServer
self.useBetaChannel = useBetaChannel
self.stageUsername = stageUsername self.stageUsername = stageUsername
self.stageSshKey = stageSshKey self.stageSshKey = stageSshKey
self.ausUser = ausUser self.ausUser = ausUser
Expand All @@ -4894,6 +4893,7 @@ def __init__(self, cvsroot, patcherToolsTag, patcherConfig, verifyConfigs,
self.ausServerUrl = ausServerUrl self.ausServerUrl = ausServerUrl
self.hgSshKey = hgSshKey self.hgSshKey = hgSshKey
self.hgUsername = hgUsername self.hgUsername = hgUsername
self.releaseChannel = releaseChannel
self.commitPatcherConfig = commitPatcherConfig self.commitPatcherConfig = commitPatcherConfig
self.oldRepoPath = oldRepoPath or kwargs['repoPath'] self.oldRepoPath = oldRepoPath or kwargs['repoPath']
self.oldRepository = self.getRepository(self.oldRepoPath) self.oldRepository = self.getRepository(self.oldRepoPath)
Expand Down Expand Up @@ -4947,11 +4947,10 @@ def __init__(self, cvsroot, patcherToolsTag, patcherConfig, verifyConfigs,
def setChannelData(self): def setChannelData(self):
# This method figures out all the information needed to push snippets # This method figures out all the information needed to push snippets
# to AUS, push test snippets live, and do basic verifications on them. # to AUS, push test snippets live, and do basic verifications on them.
# Test snippets always end up in the same local and remote directories # Test snippets and whatever channel self.relesaeChannel is always end
# All of the beta and (if applicable) release channel information # up in the same local and remote directories.
# is dependent on the useBetaChannel flag. When false, there is no # When useBetaChannelForRelease is True, we have a 'beta' channel
# release channel, and the beta channel is comprable to 'releasetest' # in addition to whatever the releaseChannel.
# rather than 'betatest'
baseSnippetDir = self.getSnippetDir() baseSnippetDir = self.getSnippetDir()
self.dirMap = { self.dirMap = {
'aus2.test': '%s-test' % baseSnippetDir, 'aus2.test': '%s-test' % baseSnippetDir,
Expand All @@ -4961,19 +4960,22 @@ def setChannelData(self):
self.channels = { self.channels = {
'betatest': { 'dir': 'aus2.test' }, 'betatest': { 'dir': 'aus2.test' },
'releasetest': { 'dir': 'aus2.test' }, 'releasetest': { 'dir': 'aus2.test' },
'beta': {} self.releaseChannel: {
}
if self.useBetaChannel:
if self.useBetaChannelForRelease:
self.dirMap['aus2.beta'] = '%s-beta' % baseSnippetDir
self.channels['beta']['dir'] = 'aus2.beta'
self.channels['release'] = {
'dir': 'aus2', 'dir': 'aus2',
'compareTo': 'releasetest', 'compareTo': 'releasetest',
} }
}

if self.useBetaChannelForRelease:
self.dirMap['aus2.beta'] = '%s-beta' % baseSnippetDir
self.channels['beta'] = {'dir': 'aus2.beta'}

# XXX: hack alert
if 'esr' in self.version:
self.testChannel = 'esrtest'
self.channels['esrtest'] = { 'dir': 'aus2.test' }
else: else:
self.channels['beta']['dir'] = 'aus2' self.testChannel = 'betatest'
self.channels['beta']['compareTo'] = 'releasetest'


def setup(self): def setup(self):
# General setup # General setup
Expand Down Expand Up @@ -5037,7 +5039,7 @@ def bumpPatcherConfig(self):
bumpCommand.extend(['--marname', self.binaryName.lower()]) bumpCommand.extend(['--marname', self.binaryName.lower()])
if self.oldBinaryName: if self.oldBinaryName:
bumpCommand.extend(['--oldmarname', self.oldBinaryName.lower()]) bumpCommand.extend(['--oldmarname', self.oldBinaryName.lower()])
if self.useBetaChannel: if self.useBetaChannelForRelease:
bumpCommand.append('-u') bumpCommand.append('-u')
if self.releaseNotesUrl: if self.releaseNotesUrl:
bumpCommand.extend(['-n', self.releaseNotesUrl]) bumpCommand.extend(['-n', self.releaseNotesUrl])
Expand Down Expand Up @@ -5197,7 +5199,7 @@ def createBuildNSnippets(self):
'--build-number', self.buildNumber, '--build-number', self.buildNumber,
'--old-build-number', self.oldBuildNumber, '--old-build-number', self.oldBuildNumber,
'--channel', 'betatest', '--channel', 'releasetest', '--channel', 'betatest', '--channel', 'releasetest',
'--channel', 'beta', '--channel', self.releaseChannel,
'--stage-server', self.stagingServer, '--stage-server', self.stagingServer,
'--old-base-snippet-dir', '.', '--old-base-snippet-dir', '.',
'--workdir', '.', '--workdir', '.',
Expand All @@ -5206,8 +5208,8 @@ def createBuildNSnippets(self):
'--verbose'] '--verbose']
for p in (self.verifyConfigs.keys()): for p in (self.verifyConfigs.keys()):
command.extend(['--platform', p]) command.extend(['--platform', p])
if self.useBetaChannel: if self.useBetaChannelForRelease:
command.extend(['--channel', 'release']) command.extend(['--channel', 'beta'])
if self.testOlderPartials: if self.testOlderPartials:
command.extend(['--generate-partials']) command.extend(['--generate-partials'])
self.addStep(ShellCommand( self.addStep(ShellCommand(
Expand Down Expand Up @@ -5322,7 +5324,7 @@ def getUpdateVerifyBumpCommand(self, platform):
'-s', self.stagingServer, '-c', verifyConfigPath, '-s', self.stagingServer, '-c', verifyConfigPath,
'-d', oldCandidatesDir, '-l', 'shipped-locales', '-d', oldCandidatesDir, '-l', 'shipped-locales',
'--old-shipped-locales', 'old-shipped-locales', '--old-shipped-locales', 'old-shipped-locales',
'--pretty-candidates-dir'] '--pretty-candidates-dir', '--channel', self.testChannel]
if self.binaryName: if self.binaryName:
bcmd.extend(['--binary-name', self.binaryName]) bcmd.extend(['--binary-name', self.binaryName])
if self.oldBinaryName: if self.oldBinaryName:
Expand Down Expand Up @@ -5372,7 +5374,7 @@ def bumpPatcherConfig(self):
'--update-type=major'] '--update-type=major']
for platform in sorted(self.verifyConfigs.keys()): for platform in sorted(self.verifyConfigs.keys()):
bumpCommand.extend(['--platform', platform]) bumpCommand.extend(['--platform', platform])
if self.useBetaChannel: if self.useBetaChannelForRelease:
bumpCommand.append('-u') bumpCommand.append('-u')
if self.releaseNotesUrl: if self.releaseNotesUrl:
bumpCommand.extend(['-n', self.releaseNotesUrl]) bumpCommand.extend(['-n', self.releaseNotesUrl])
Expand Down
24 changes: 14 additions & 10 deletions process/release.py
Expand Up @@ -69,6 +69,9 @@ def generateReleaseBranchObjects(releaseConfig, branchConfig,
tools_repo = '%s%s' % (branchConfig['hgurl'], tools_repo_path) tools_repo = '%s%s' % (branchConfig['hgurl'], tools_repo_path)
config_repo = '%s%s' % (branchConfig['hgurl'], config_repo = '%s%s' % (branchConfig['hgurl'],
branchConfig['config_repo_path']) branchConfig['config_repo_path'])
mozharness_repo_path = releaseConfig.get('mozharness_repo_path',
branchConfig['mozharness_repo_path'])
mozharness_repo = '%s%s' % (branchConfig['hgurl'], mozharness_repo_path)


branchConfigFile = getRealpath('localconfig.py') branchConfigFile = getRealpath('localconfig.py')
unix_slaves = [] unix_slaves = []
Expand Down Expand Up @@ -589,7 +592,7 @@ def majorUpdateVerifyBuilders(platform):
pf.get('multi_locale', False)), pf.get('multi_locale', False)),
multiLocaleMerge=releaseConfig.get('mergeLocales', False), multiLocaleMerge=releaseConfig.get('mergeLocales', False),
compareLocalesRepoPath=branchConfig['compare_locales_repo_path'], compareLocalesRepoPath=branchConfig['compare_locales_repo_path'],
mozharnessRepoPath=branchConfig['mozharness_repo_path'], mozharnessRepoPath=mozharness_repo_path,
mozharnessTag=releaseTag, mozharnessTag=releaseTag,
multiLocaleScript=pf.get('multi_locale_script'), multiLocaleScript=pf.get('multi_locale_script'),
multiLocaleConfig=multiLocaleConfig, multiLocaleConfig=multiLocaleConfig,
Expand Down Expand Up @@ -657,11 +660,12 @@ def majorUpdateVerifyBuilders(platform):
for n, builderName in l10nBuilders(platform).iteritems(): for n, builderName in l10nBuilders(platform).iteritems():
if releaseConfig['productName'] == 'fennec': if releaseConfig['productName'] == 'fennec':
repack_factory = ScriptFactory( repack_factory = ScriptFactory(
scriptRepo=tools_repo, scriptRepo=mozharness_repo,
interpreter='bash', scriptName='scripts/mobile_l10n.py',
scriptName='scripts/l10n/release_mobile_repacks.sh', extra_args=['--cfg',
extra_args=[platform, branchConfigFile, 'single_locale/release_%s_%s.py' % (releaseConfig['sourceRepositories']['mobile']['name'], platform),
str(l10nChunks), str(n)] '--total-chunks', str(l10nChunks),
'--this-chunk', str(n)]
) )
else: else:
extra_args = [platform, branchConfigFile, str(l10nChunks), extra_args = [platform, branchConfigFile, str(l10nChunks),
Expand Down Expand Up @@ -910,6 +914,7 @@ def majorUpdateVerifyBuilders(platform):


if releaseConfig.get('verifyConfigs') and \ if releaseConfig.get('verifyConfigs') and \
not releaseConfig.get('skip_updates'): not releaseConfig.get('skip_updates'):
releaseChannel = releaseConfig.get('releaseChannel', branchConfig['update_channel'])
updates_factory = ReleaseUpdatesFactory( updates_factory = ReleaseUpdatesFactory(
hgHost=branchConfig['hghost'], hgHost=branchConfig['hghost'],
repoPath=sourceRepoInfo['path'], repoPath=sourceRepoInfo['path'],
Expand All @@ -931,15 +936,15 @@ def majorUpdateVerifyBuilders(platform):
ftpServer=releaseConfig['ftpServer'], ftpServer=releaseConfig['ftpServer'],
bouncerServer=releaseConfig['bouncerServer'], bouncerServer=releaseConfig['bouncerServer'],
stagingServer=releaseConfig['stagingServer'], stagingServer=releaseConfig['stagingServer'],
useBetaChannel=releaseConfig['useBetaChannel'],
stageUsername=branchConfig['stage_username'], stageUsername=branchConfig['stage_username'],
stageSshKey=branchConfig['stage_ssh_key'], stageSshKey=branchConfig['stage_ssh_key'],
ausUser=releaseConfig['ausUser'], ausUser=releaseConfig['ausUser'],
ausSshKey=releaseConfig['ausSshKey'], ausSshKey=releaseConfig['ausSshKey'],
ausHost=branchConfig['aus2_host'], ausHost=releaseConfig['ausHost'],
ausServerUrl=releaseConfig['ausServerUrl'], ausServerUrl=releaseConfig['ausServerUrl'],
hgSshKey=releaseConfig['hgSshKey'], hgSshKey=releaseConfig['hgSshKey'],
hgUsername=releaseConfig['hgUsername'], hgUsername=releaseConfig['hgUsername'],
releaseChannel=releaseChannel,
# We disable this on staging, because we don't have a CVS mirror to # We disable this on staging, because we don't have a CVS mirror to
# commit to # commit to
commitPatcherConfig=releaseConfig['commitPatcherConfig'], commitPatcherConfig=releaseConfig['commitPatcherConfig'],
Expand Down Expand Up @@ -1170,12 +1175,11 @@ def majorUpdateVerifyBuilders(platform):
ftpServer=releaseConfig['ftpServer'], ftpServer=releaseConfig['ftpServer'],
bouncerServer=releaseConfig['bouncerServer'], bouncerServer=releaseConfig['bouncerServer'],
stagingServer=releaseConfig['stagingServer'], stagingServer=releaseConfig['stagingServer'],
useBetaChannel=releaseConfig['useBetaChannel'],
stageUsername=branchConfig['stage_username'], stageUsername=branchConfig['stage_username'],
stageSshKey=branchConfig['stage_ssh_key'], stageSshKey=branchConfig['stage_ssh_key'],
ausUser=releaseConfig['ausUser'], ausUser=releaseConfig['ausUser'],
ausSshKey=releaseConfig['ausSshKey'], ausSshKey=releaseConfig['ausSshKey'],
ausHost=branchConfig['aus2_host'], ausHost=releaseConfig['ausHost'],
ausServerUrl=releaseConfig['ausServerUrl'], ausServerUrl=releaseConfig['ausServerUrl'],
hgSshKey=releaseConfig['hgSshKey'], hgSshKey=releaseConfig['hgSshKey'],
hgUsername=releaseConfig['hgUsername'], hgUsername=releaseConfig['hgUsername'],
Expand Down
76 changes: 76 additions & 0 deletions test/test_process_factory.py
@@ -0,0 +1,76 @@
import unittest

from buildbotcustom.process.factory import ReleaseUpdatesFactory

class SimpleUpdatesFactory(ReleaseUpdatesFactory):
def __init__(self, version, releaseChannel, useBetaChannelForRelease):
self.version = version
self.releaseChannel = releaseChannel
self.useBetaChannelForRelease = useBetaChannelForRelease
self.setChannelData()
def getSnippetDir(self):
return 'foo'

class TestReleaseUpdatesFactory(unittest.TestCase):
def testSetChannelDataWithBetaAndReleaseChannel(self):
expectedChannels = {
'betatest': {'dir': 'aus2.test'},
'releasetest': {'dir': 'aus2.test'},
'beta': {'dir': 'aus2.beta'},
'release': {'dir': 'aus2', 'compareTo': 'releasetest'},
}
expectedDirMap = {
'aus2.test': 'foo-test',
'aus2.beta': 'foo-beta',
'aus2': 'foo',
}
uf = SimpleUpdatesFactory('3.6.26', 'release', True)
self.assertEqual(uf.channels, expectedChannels)
self.assertEqual(uf.dirMap, expectedDirMap)
self.assertEqual(uf.testChannel, 'betatest')

def testSetChannelDataWithBetaChannelOnly(self):
expectedChannels = {
'betatest': {'dir': 'aus2.test'},
'releasetest': {'dir': 'aus2.test'},
'beta': {'dir': 'aus2', 'compareTo': 'releasetest'},
}
expectedDirMap = {
'aus2.test': 'foo-test',
'aus2': 'foo',
}
uf = SimpleUpdatesFactory('10.0b6', 'beta', False)
self.assertEqual(uf.channels, expectedChannels)
self.assertEqual(uf.dirMap, expectedDirMap)
self.assertEqual(uf.testChannel, 'betatest')

def testSetChannelDataWithReleaseChannelOnly(self):
expectedChannels = {
'betatest': {'dir': 'aus2.test'},
'releasetest': {'dir': 'aus2.test'},
'release': {'dir': 'aus2', 'compareTo': 'releasetest'},
}
expectedDirMap = {
'aus2.test': 'foo-test',
'aus2': 'foo',
}
uf = SimpleUpdatesFactory('9.0.1', 'release', False)
self.assertEqual(uf.channels, expectedChannels)
self.assertEqual(uf.dirMap, expectedDirMap)
self.assertEqual(uf.testChannel, 'betatest')

def testSetChannelDataWithEsrChannelOnly(self):
expectedChannels = {
'betatest': {'dir': 'aus2.test'},
'releasetest': {'dir': 'aus2.test'},
'esrtest': {'dir': 'aus2.test'},
'esr': {'dir': 'aus2', 'compareTo': 'releasetest'},
}
expectedDirMap = {
'aus2.test': 'foo-test',
'aus2': 'foo',
}
uf = SimpleUpdatesFactory('10.0esr', 'esr', False)
self.assertEqual(uf.channels, expectedChannels)
self.assertEqual(uf.dirMap, expectedDirMap)
self.assertEqual(uf.testChannel, 'esrtest')

0 comments on commit 6998c14

Please sign in to comment.