Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

merge default -> production-0.8

--HG--
branch : production-0.8
  • Loading branch information...
commit 6998c14e41be00f4dff3c30d728f6af9119c6731 2 parents cae0370 + ff3c22c
Aki Sasaki authored
19  misc.py
@@ -1172,13 +1172,8 @@ def generateBranchObjects(config, name, secrets=None):
1172 1172
             triggeredSchedulers=None
1173 1173
             if config['enable_l10n'] and pf.get('is_mobile_l10n') and pf.get('l10n_chunks'):
1174 1174
                 mobile_l10n_scheduler_name = '%s-%s-l10n' % (name, platform)
1175  
-                builder_env = platform_env.copy()
1176  
-                builder_env.update({
1177  
-                    'BUILDBOT_CONFIGS': '%s%s' % (config['hgurl'],
1178  
-                                                  config['config_repo_path']),
1179  
-                    'CLOBBERER_URL': config['base_clobber_url'],
1180  
-                })
1181 1175
                 mobile_l10n_builders = []
  1176
+                builder_env = platform_env.copy()
1182 1177
                 for n in range(1, int(pf['l10n_chunks']) + 1):
1183 1178
                     builddir='%s-%s-l10n_%s' % (name, platform, str(n))
1184 1179
                     builderName = "%s l10n nightly %s/%s" % \
@@ -1186,12 +1181,12 @@ def generateBranchObjects(config, name, secrets=None):
1186 1181
                     mobile_l10n_builders.append(builderName)
1187 1182
                     factory = ScriptFactory(
1188 1183
                         scriptRepo='%s%s' % (config['hgurl'],
1189  
-                                              config['build_tools_repo_path']),
1190  
-                        interpreter='bash',
1191  
-                        scriptName='scripts/l10n/nightly_mobile_repacks.sh',
1192  
-                        extra_args=[platform, stage_platform,
1193  
-                                    getRealpath('localconfig.py'),
1194  
-                                    str(pf['l10n_chunks']), str(n)]
  1184
+                                             config['mozharness_repo_path']),
  1185
+                        scriptName='scripts/mobile_l10n.py',
  1186
+                        extra_args=['--cfg',
  1187
+                                    'single_locale/%s_%s.py' % (name, platform),
  1188
+                                    '--total-chunks', str(pf['l10n_chunks']),
  1189
+                                    '--this-chunk', str(n)]
1195 1190
                     )
1196 1191
                     slavebuilddir = reallyShort(builddir)
1197 1192
                     branchObjects['builders'].append({
60  process/factory.py
@@ -4830,15 +4830,15 @@ def __init__(self, cvsroot, patcherToolsTag, patcherConfig, verifyConfigs,
4830 4830
                  appName, productName,
4831 4831
                  version, appVersion, baseTag, buildNumber,
4832 4832
                  oldVersion, oldAppVersion, oldBaseTag,  oldBuildNumber,
4833  
-                 ftpServer, bouncerServer, stagingServer, useBetaChannel,
  4833
+                 ftpServer, bouncerServer, stagingServer,
4834 4834
                  stageUsername, stageSshKey, ausUser, ausSshKey, ausHost,
4835  
-                 ausServerUrl, hgSshKey, hgUsername, commitPatcherConfig=True,
4836  
-                 mozRepoPath=None, oldRepoPath=None, brandName=None,
4837  
-                 buildSpace=22, triggerSchedulers=None, releaseNotesUrl=None,
4838  
-                 binaryName=None, oldBinaryName=None, testOlderPartials=False,
4839  
-                 fakeMacInfoTxt=False, longVersion=None, oldLongVersion=None,
4840  
-                 schema=None, useBetaChannelForRelease=False,
4841  
-                 useChecksums=False, **kwargs):
  4835
+                 ausServerUrl, hgSshKey, hgUsername, releaseChannel='release',
  4836
+                 commitPatcherConfig=True, mozRepoPath=None, oldRepoPath=None,
  4837
+                 brandName=None, buildSpace=22, triggerSchedulers=None,
  4838
+                 releaseNotesUrl=None, binaryName=None, oldBinaryName=None,
  4839
+                 testOlderPartials=False, fakeMacInfoTxt=False,
  4840
+                 longVersion=None, oldLongVersion=None, schema=None,
  4841
+                 useBetaChannelForRelease=False, useChecksums=False, **kwargs):
4842 4842
         """cvsroot: The CVSROOT to use when pulling patcher, patcher-configs,
4843 4843
                     Bootstrap/Util.pm, and MozBuild. It is also used when
4844 4844
                     commiting the version-bumped patcher config so it must have
@@ -4885,7 +4885,6 @@ def __init__(self, cvsroot, patcherToolsTag, patcherConfig, verifyConfigs,
4885 4885
         self.ftpServer = ftpServer
4886 4886
         self.bouncerServer = bouncerServer
4887 4887
         self.stagingServer = stagingServer
4888  
-        self.useBetaChannel = useBetaChannel
4889 4888
         self.stageUsername = stageUsername
4890 4889
         self.stageSshKey = stageSshKey
4891 4890
         self.ausUser = ausUser
@@ -4894,6 +4893,7 @@ def __init__(self, cvsroot, patcherToolsTag, patcherConfig, verifyConfigs,
4894 4893
         self.ausServerUrl = ausServerUrl
4895 4894
         self.hgSshKey = hgSshKey
4896 4895
         self.hgUsername = hgUsername
  4896
+        self.releaseChannel = releaseChannel
4897 4897
         self.commitPatcherConfig = commitPatcherConfig
4898 4898
         self.oldRepoPath = oldRepoPath or kwargs['repoPath']
4899 4899
         self.oldRepository = self.getRepository(self.oldRepoPath)
@@ -4947,11 +4947,10 @@ def __init__(self, cvsroot, patcherToolsTag, patcherConfig, verifyConfigs,
4947 4947
     def setChannelData(self):
4948 4948
         # This method figures out all the information needed to push snippets
4949 4949
         # to AUS, push test snippets live, and do basic verifications on them.
4950  
-        # Test snippets always end up in the same local and remote directories
4951  
-        # All of the beta and (if applicable) release channel information
4952  
-        # is dependent on the useBetaChannel flag. When false, there is no
4953  
-        # release channel, and the beta channel is comprable to 'releasetest'
4954  
-        # rather than 'betatest'
  4950
+        # Test snippets and whatever channel self.relesaeChannel is always end
  4951
+        # up in the same local and remote directories.
  4952
+        # When useBetaChannelForRelease is True, we have a 'beta' channel
  4953
+        # in addition to whatever the releaseChannel.
4955 4954
         baseSnippetDir = self.getSnippetDir()
4956 4955
         self.dirMap = {
4957 4956
             'aus2.test': '%s-test' % baseSnippetDir,
@@ -4961,19 +4960,22 @@ def setChannelData(self):
4961 4960
         self.channels = {
4962 4961
             'betatest': { 'dir': 'aus2.test' },
4963 4962
             'releasetest': { 'dir': 'aus2.test' },
4964  
-            'beta': {}
4965  
-        }
4966  
-        if self.useBetaChannel:
4967  
-            if self.useBetaChannelForRelease:
4968  
-                self.dirMap['aus2.beta'] = '%s-beta' % baseSnippetDir
4969  
-                self.channels['beta']['dir'] = 'aus2.beta'
4970  
-            self.channels['release'] = {
  4963
+            self.releaseChannel: {
4971 4964
                 'dir': 'aus2',
4972 4965
                 'compareTo': 'releasetest',
4973 4966
             }
  4967
+        }
  4968
+
  4969
+        if self.useBetaChannelForRelease:
  4970
+            self.dirMap['aus2.beta'] = '%s-beta' % baseSnippetDir
  4971
+            self.channels['beta'] = {'dir': 'aus2.beta'}
  4972
+
  4973
+        # XXX: hack alert
  4974
+        if 'esr' in self.version:
  4975
+            self.testChannel = 'esrtest'
  4976
+            self.channels['esrtest'] = { 'dir': 'aus2.test' }
4974 4977
         else:
4975  
-            self.channels['beta']['dir'] = 'aus2'
4976  
-            self.channels['beta']['compareTo'] = 'releasetest'
  4978
+            self.testChannel = 'betatest'
4977 4979
 
4978 4980
     def setup(self):
4979 4981
         # General setup
@@ -5037,7 +5039,7 @@ def bumpPatcherConfig(self):
5037 5039
             bumpCommand.extend(['--marname', self.binaryName.lower()])
5038 5040
         if self.oldBinaryName:
5039 5041
             bumpCommand.extend(['--oldmarname', self.oldBinaryName.lower()])
5040  
-        if self.useBetaChannel:
  5042
+        if self.useBetaChannelForRelease:
5041 5043
             bumpCommand.append('-u')
5042 5044
         if self.releaseNotesUrl:
5043 5045
             bumpCommand.extend(['-n', self.releaseNotesUrl])
@@ -5197,7 +5199,7 @@ def createBuildNSnippets(self):
5197 5199
                    '--build-number', self.buildNumber,
5198 5200
                    '--old-build-number', self.oldBuildNumber,
5199 5201
                    '--channel', 'betatest', '--channel', 'releasetest',
5200  
-                   '--channel', 'beta',
  5202
+                   '--channel', self.releaseChannel,
5201 5203
                    '--stage-server', self.stagingServer,
5202 5204
                    '--old-base-snippet-dir', '.',
5203 5205
                    '--workdir', '.',
@@ -5206,8 +5208,8 @@ def createBuildNSnippets(self):
5206 5208
                    '--verbose']
5207 5209
         for p in (self.verifyConfigs.keys()):
5208 5210
             command.extend(['--platform', p])
5209  
-        if self.useBetaChannel:
5210  
-            command.extend(['--channel', 'release'])
  5211
+        if self.useBetaChannelForRelease:
  5212
+            command.extend(['--channel', 'beta'])
5211 5213
         if self.testOlderPartials:
5212 5214
             command.extend(['--generate-partials'])
5213 5215
         self.addStep(ShellCommand(
@@ -5322,7 +5324,7 @@ def getUpdateVerifyBumpCommand(self, platform):
5322 5324
                 '-s', self.stagingServer, '-c', verifyConfigPath,
5323 5325
                 '-d', oldCandidatesDir, '-l', 'shipped-locales',
5324 5326
                 '--old-shipped-locales', 'old-shipped-locales',
5325  
-                '--pretty-candidates-dir']
  5327
+                '--pretty-candidates-dir', '--channel', self.testChannel]
5326 5328
         if self.binaryName:
5327 5329
             bcmd.extend(['--binary-name', self.binaryName])
5328 5330
         if self.oldBinaryName:
@@ -5372,7 +5374,7 @@ def bumpPatcherConfig(self):
5372 5374
                        '--update-type=major']
5373 5375
         for platform in sorted(self.verifyConfigs.keys()):
5374 5376
             bumpCommand.extend(['--platform', platform])
5375  
-        if self.useBetaChannel:
  5377
+        if self.useBetaChannelForRelease:
5376 5378
             bumpCommand.append('-u')
5377 5379
         if self.releaseNotesUrl:
5378 5380
             bumpCommand.extend(['-n', self.releaseNotesUrl])
24  process/release.py
@@ -69,6 +69,9 @@ def generateReleaseBranchObjects(releaseConfig, branchConfig,
69 69
     tools_repo = '%s%s' % (branchConfig['hgurl'], tools_repo_path)
70 70
     config_repo = '%s%s' % (branchConfig['hgurl'],
71 71
                              branchConfig['config_repo_path'])
  72
+    mozharness_repo_path = releaseConfig.get('mozharness_repo_path',
  73
+                                             branchConfig['mozharness_repo_path'])
  74
+    mozharness_repo = '%s%s' % (branchConfig['hgurl'], mozharness_repo_path)
72 75
 
73 76
     branchConfigFile = getRealpath('localconfig.py')
74 77
     unix_slaves = []
@@ -589,7 +592,7 @@ def majorUpdateVerifyBuilders(platform):
589 592
                                  pf.get('multi_locale', False)),
590 593
                 multiLocaleMerge=releaseConfig.get('mergeLocales', False),
591 594
                 compareLocalesRepoPath=branchConfig['compare_locales_repo_path'],
592  
-                mozharnessRepoPath=branchConfig['mozharness_repo_path'],
  595
+                mozharnessRepoPath=mozharness_repo_path,
593 596
                 mozharnessTag=releaseTag,
594 597
                 multiLocaleScript=pf.get('multi_locale_script'),
595 598
                 multiLocaleConfig=multiLocaleConfig,
@@ -657,11 +660,12 @@ def majorUpdateVerifyBuilders(platform):
657 660
             for n, builderName in l10nBuilders(platform).iteritems():
658 661
                 if releaseConfig['productName'] == 'fennec':
659 662
                     repack_factory = ScriptFactory(
660  
-                        scriptRepo=tools_repo,
661  
-                        interpreter='bash',
662  
-                        scriptName='scripts/l10n/release_mobile_repacks.sh',
663  
-                        extra_args=[platform, branchConfigFile,
664  
-                                    str(l10nChunks), str(n)]
  663
+                        scriptRepo=mozharness_repo,
  664
+                        scriptName='scripts/mobile_l10n.py',
  665
+                        extra_args=['--cfg',
  666
+                                    'single_locale/release_%s_%s.py' % (releaseConfig['sourceRepositories']['mobile']['name'], platform),
  667
+                                    '--total-chunks', str(l10nChunks),
  668
+                                    '--this-chunk', str(n)]
665 669
                     )
666 670
                 else:
667 671
                     extra_args = [platform, branchConfigFile, str(l10nChunks),
@@ -910,6 +914,7 @@ def majorUpdateVerifyBuilders(platform):
910 914
 
911 915
     if releaseConfig.get('verifyConfigs') and \
912 916
        not releaseConfig.get('skip_updates'):
  917
+        releaseChannel = releaseConfig.get('releaseChannel', branchConfig['update_channel'])
913 918
         updates_factory = ReleaseUpdatesFactory(
914 919
             hgHost=branchConfig['hghost'],
915 920
             repoPath=sourceRepoInfo['path'],
@@ -931,15 +936,15 @@ def majorUpdateVerifyBuilders(platform):
931 936
             ftpServer=releaseConfig['ftpServer'],
932 937
             bouncerServer=releaseConfig['bouncerServer'],
933 938
             stagingServer=releaseConfig['stagingServer'],
934  
-            useBetaChannel=releaseConfig['useBetaChannel'],
935 939
             stageUsername=branchConfig['stage_username'],
936 940
             stageSshKey=branchConfig['stage_ssh_key'],
937 941
             ausUser=releaseConfig['ausUser'],
938 942
             ausSshKey=releaseConfig['ausSshKey'],
939  
-            ausHost=branchConfig['aus2_host'],
  943
+            ausHost=releaseConfig['ausHost'],
940 944
             ausServerUrl=releaseConfig['ausServerUrl'],
941 945
             hgSshKey=releaseConfig['hgSshKey'],
942 946
             hgUsername=releaseConfig['hgUsername'],
  947
+            releaseChannel=releaseChannel,
943 948
             # We disable this on staging, because we don't have a CVS mirror to
944 949
             # commit to
945 950
             commitPatcherConfig=releaseConfig['commitPatcherConfig'],
@@ -1170,12 +1175,11 @@ def majorUpdateVerifyBuilders(platform):
1170 1175
             ftpServer=releaseConfig['ftpServer'],
1171 1176
             bouncerServer=releaseConfig['bouncerServer'],
1172 1177
             stagingServer=releaseConfig['stagingServer'],
1173  
-            useBetaChannel=releaseConfig['useBetaChannel'],
1174 1178
             stageUsername=branchConfig['stage_username'],
1175 1179
             stageSshKey=branchConfig['stage_ssh_key'],
1176 1180
             ausUser=releaseConfig['ausUser'],
1177 1181
             ausSshKey=releaseConfig['ausSshKey'],
1178  
-            ausHost=branchConfig['aus2_host'],
  1182
+            ausHost=releaseConfig['ausHost'],
1179 1183
             ausServerUrl=releaseConfig['ausServerUrl'],
1180 1184
             hgSshKey=releaseConfig['hgSshKey'],
1181 1185
             hgUsername=releaseConfig['hgUsername'],
76  test/test_process_factory.py
... ...
@@ -0,0 +1,76 @@
  1
+import unittest
  2
+
  3
+from buildbotcustom.process.factory import ReleaseUpdatesFactory
  4
+
  5
+class SimpleUpdatesFactory(ReleaseUpdatesFactory):
  6
+    def __init__(self, version, releaseChannel, useBetaChannelForRelease):
  7
+        self.version = version
  8
+        self.releaseChannel = releaseChannel
  9
+        self.useBetaChannelForRelease = useBetaChannelForRelease
  10
+        self.setChannelData()
  11
+    def getSnippetDir(self):
  12
+        return 'foo'
  13
+
  14
+class TestReleaseUpdatesFactory(unittest.TestCase):
  15
+    def testSetChannelDataWithBetaAndReleaseChannel(self):
  16
+        expectedChannels = {
  17
+            'betatest': {'dir': 'aus2.test'},
  18
+            'releasetest': {'dir': 'aus2.test'},
  19
+            'beta': {'dir': 'aus2.beta'},
  20
+            'release': {'dir': 'aus2', 'compareTo': 'releasetest'},
  21
+        }
  22
+        expectedDirMap = {
  23
+            'aus2.test': 'foo-test',
  24
+            'aus2.beta': 'foo-beta',
  25
+            'aus2': 'foo',
  26
+        }
  27
+        uf = SimpleUpdatesFactory('3.6.26', 'release', True)
  28
+        self.assertEqual(uf.channels, expectedChannels)
  29
+        self.assertEqual(uf.dirMap, expectedDirMap)
  30
+        self.assertEqual(uf.testChannel, 'betatest')
  31
+
  32
+    def testSetChannelDataWithBetaChannelOnly(self):
  33
+        expectedChannels = {
  34
+            'betatest': {'dir': 'aus2.test'},
  35
+            'releasetest': {'dir': 'aus2.test'},
  36
+            'beta': {'dir': 'aus2', 'compareTo': 'releasetest'},
  37
+        }
  38
+        expectedDirMap = {
  39
+            'aus2.test': 'foo-test',
  40
+            'aus2': 'foo',
  41
+        }
  42
+        uf = SimpleUpdatesFactory('10.0b6', 'beta', False)
  43
+        self.assertEqual(uf.channels, expectedChannels)
  44
+        self.assertEqual(uf.dirMap, expectedDirMap)
  45
+        self.assertEqual(uf.testChannel, 'betatest')
  46
+
  47
+    def testSetChannelDataWithReleaseChannelOnly(self):
  48
+        expectedChannels = {
  49
+            'betatest': {'dir': 'aus2.test'},
  50
+            'releasetest': {'dir': 'aus2.test'},
  51
+            'release': {'dir': 'aus2', 'compareTo': 'releasetest'},
  52
+        }
  53
+        expectedDirMap = {
  54
+            'aus2.test': 'foo-test',
  55
+            'aus2': 'foo',
  56
+        }
  57
+        uf = SimpleUpdatesFactory('9.0.1', 'release', False)
  58
+        self.assertEqual(uf.channels, expectedChannels)
  59
+        self.assertEqual(uf.dirMap, expectedDirMap)
  60
+        self.assertEqual(uf.testChannel, 'betatest')
  61
+
  62
+    def testSetChannelDataWithEsrChannelOnly(self):
  63
+        expectedChannels = {
  64
+            'betatest': {'dir': 'aus2.test'},
  65
+            'releasetest': {'dir': 'aus2.test'},
  66
+            'esrtest': {'dir': 'aus2.test'},
  67
+            'esr': {'dir': 'aus2', 'compareTo': 'releasetest'},
  68
+        }
  69
+        expectedDirMap = {
  70
+            'aus2.test': 'foo-test',
  71
+            'aus2': 'foo',
  72
+        }
  73
+        uf = SimpleUpdatesFactory('10.0esr', 'esr', False)
  74
+        self.assertEqual(uf.channels, expectedChannels)
  75
+        self.assertEqual(uf.dirMap, expectedDirMap)
  76
+        self.assertEqual(uf.testChannel, 'esrtest')

0 notes on commit 6998c14

Please sign in to comment.
Something went wrong with that request. Please try again.