bug 537296 -- fennec release builders. r=bhearsum
authorAki Sasaki <asasaki@mozilla.com>
Thu, 15 Apr 2010 10:52:21 -0700
changeset 2320 b5f4788b64f69e1b504f699e93f642956d5ee767
parent 2319 a6997e0d7dbdc68a60fb171a34bf92eb23ffad96
child 2321 72feb055bf319ba0e4e1c23ca24b399a46bd9616
push id1786
push userasasaki@mozilla.com
push dateThu, 15 Apr 2010 17:52:30 +0000
reviewersbhearsum
bugs537296
bug 537296 -- fennec release builders. r=bhearsum
mozilla2-staging/release-fennec-1.0.py
mozilla2-staging/release-fennec-1.1.py
mozilla2-staging/release_mobile_master.py
mozilla2/release-fennec-1.0.py
mozilla2/release-fennec-1.1.py
mozilla2/release_mobile_master.py
--- a/mozilla2-staging/release-fennec-1.0.py
+++ b/mozilla2-staging/release-fennec-1.0.py
@@ -28,16 +28,18 @@ mergeLocales        = True
 # appVersion, not version.
 version             = '1.0.1rc1'
 appVersion          = '1.0.1'
 milestone           = '1.9.2.1'
 buildNumber         = 1
 baseTag             = 'FENNEC_1_0_1rc1'
 enUSPlatforms       = ('maemo',)
 l10nPlatforms       = enUSPlatforms
+enUSDesktopPlatforms = ('linux-i686', 'macosx-i686', 'win32-i686')
+l10nDesktopPlatforms = ()
 talosTestPlatforms  = ()
 ftpServer           = 'staging-stage.build.mozilla.org'
 stagingServer       = 'staging-stage.build.mozilla.org'
 stageBasePath       = '/home/ftp/pub/mobile/candidates'
 base_enUS_binaryURL = 'http://%s/pub/mozilla.org/mobile/candidates/%s-candidates/build%d' % (ftpServer, version, buildNumber)
 doPartnerRepacks    = True
 partnersRepoPath    = 'build/partner-repacks'
 partnerRepackPlatforms = ('maemo',)
--- a/mozilla2-staging/release-fennec-1.1.py
+++ b/mozilla2-staging/release-fennec-1.1.py
@@ -28,16 +28,18 @@ mergeLocales        = True
 # appVersion, not version.
 version             = '1.1b1'
 appVersion          = '1.1'
 milestone           = '1.9.2.3'
 buildNumber         = 1
 baseTag             = 'FENNEC_1_1b1'
 enUSPlatforms       = ('maemo',)
 l10nPlatforms       = enUSPlatforms
+enUSDesktopPlatforms = ('linux-i686', 'macosx-i686', 'win32-i686')
+l10nDesktopPlatforms = ()
 talosTestPlatforms  = ()
 ftpServer           = 'staging-stage.build.mozilla.org'
 stagingServer       = 'staging-stage.build.mozilla.org'
 stageBasePath       = '/home/ftp/pub/mobile/candidates'
 base_enUS_binaryURL = 'http://%s/pub/mozilla.org/mobile/candidates/%s-candidates/build%d' % (ftpServer, version, buildNumber)
 doPartnerRepacks    = True
 partnersRepoPath    = 'build/partner-repacks'
 partnerRepackPlatforms = ('maemo',)
--- a/mozilla2-staging/release_mobile_master.py
+++ b/mozilla2-staging/release_mobile_master.py
@@ -6,17 +6,18 @@ import buildbotcustom.l10n
 import buildbotcustom.misc
 import buildbotcustom.process.factory
 
 from buildbotcustom.l10n import DependentL10n
 from buildbotcustom.misc import get_locales_from_json, \
                                 isHgPollerTriggered
 from buildbotcustom.process.factory import StagingRepositorySetupFactory, \
   ReleaseTaggingFactory, MultiSourceFactory, MaemoReleaseBuildFactory, \
-  MaemoReleaseRepackFactory, PartnerRepackFactory
+  MaemoReleaseRepackFactory, PartnerRepackFactory, \
+  ReleaseMobileDesktopBuildFactory
 from buildbotcustom.changes.ftppoller import FtpPoller
 
 # this is where all of our important configuration is stored. build number,
 # version number, sign-off revisions, etc.
 import release_mobile_config
 reload(release_mobile_config)
 from release_mobile_config import *
 
@@ -82,23 +83,43 @@ for platform in enUSPlatforms:
             builderNames=['%s_repack' % platform],
             repoType='hg',
             branch=mobileSourceRepoPath,
             baseTag='%s_RELEASE' % baseTag,
             locales=platform_locales[platform],
             tree='release'
         )
         schedulers.append(repack_scheduler)
-    if doPartnerRepacks:
-        partner_scheduler = Dependent(
-            name='mobile_partner_repacks',
+for platform in enUSDesktopPlatforms:
+    build_scheduler = Dependent(
+        name='mobile_%s_desktop_build' % platform,
+        upstream=tag_scheduler,
+        builderNames=['mobile_%s_desktop_build' % platform]
+    )
+    schedulers.append(build_scheduler)
+    if platform in l10nDesktopPlatforms:
+        repack_scheduler = DependentL10n(
+            name='mobile_%s_desktop_repack' % platform,
+            platform=platform,
             upstream=build_scheduler,
-            builderNames=['mobile_partner_repack']
+            builderNames=['mobile_%s_desktop_repack' % platform],
+            repoType='hg',
+            branch=mobileSourceRepoPath,
+            baseTag='%s_RELEASE' % baseTag,
+            locales=platform_locales[platform],
+            tree='release'
         )
-        schedulers.append(partner_scheduler)
+        schedulers.append(repack_scheduler)
+if doPartnerRepacks:
+    partner_scheduler = Dependent(
+        name='mobile_partner_repacks',
+        upstream=build_scheduler,
+        builderNames=['mobile_partner_repack']
+    )
+    schedulers.append(partner_scheduler)
 
 ##### Builders
 clone_repositories = {
     mozSourceRepoClonePath: {
         'revision': mozSourceRepoRevision,
         'relbranchOverride': mozRelbranchOverride,
         'bumpFiles': [],
     },
@@ -198,50 +219,58 @@ builders.append({
     'slavenames': branchConfig['platforms']['linux']['slaves'],
     'category': 'release',
     'builddir': 'mobile_source',
     'factory': mobile_source_factory
 })
 
 
 for platform in enUSPlatforms:
+
+    baseUploadDir='%s-candidates/build%d' % (version, buildNumber)
+    candidatesPath = '%s/%s' % (stageBasePath, baseUploadDir)
+    build_factory = None
+    repack_factory = None
+
     if platform == 'maemo':
         pf = mobileBranchConfig['platforms']['linux-gnueabi-arm']
+        clobberTime = pf.get('clobber_time', branchConfig['default_clobber_time'])
         mozconfig = 'linux/%s/release' % mobileSourceRepoName
         releaseWorkDir  = pf['base_workdir'] + '-release'
         releaseBuildDir = pf['base_builddir'] + '-release'
         build_factory = MaemoReleaseBuildFactory(
             env=pf['env'],
             hgHost=branchConfig['hghost'],
             repoPath=mozSourceRepoPath,
             configRepoPath=branchConfig['config_repo_path'],
             configSubDir=branchConfig['config_subdir'],
             mozconfig=mozconfig,
             stageUsername=branchConfig['stage_username'],
             stageServer=branchConfig['stage_server'],
-            stageBasePath='%s/%s-candidates/build%d' % (stageBasePath,
-                                                        version, buildNumber),
             stageSshKey=branchConfig['stage_ssh_key'],
+            stageBasePath=candidatesPath,
             mobileRepoPath=mobileSourceRepoPath,
             mozRevision='%s_RELEASE' % baseTag,
             mobileRevision='%s_RELEASE' % baseTag,
             l10nTag='%s_RELEASE' % baseTag,
             platform='linux-gnueabi-arm',
+            buildsBeforeReboot=pf['builds_before_reboot'],
             baseWorkDir=releaseWorkDir,
             baseBuildDir=releaseBuildDir,
-            baseUploadDir='%s-candidates/build%d' % (version, buildNumber),
+            baseUploadDir=baseUploadDir,
             buildToolsRepoPath=branchConfig['build_tools_repo_path'],
+            clobberURL=branchConfig['base_clobber_url'],
+            clobberTime=clobberTime,
             buildSpace=10,
             mergeLocales=mergeLocales,
             locales=platform_locales['maemo-multilocale'].keys(),
             multiLocale=mobileBranchConfig['enable_multi_locale'],
             l10nRepoPath=l10nRepoPath,
             triggerBuilds=False,
         )
-
     builders.append({
         'name': '%s_build' % platform,
         'slavenames': pf['slaves'],
         'category': 'release',
         'builddir': '%s_build' % platform,
         'factory': build_factory
     })
 
@@ -278,16 +307,67 @@ for platform in enUSPlatforms:
 
         builders.append({
             'name': '%s_repack' % platform,
             'slavenames': MOBILE_L10N_SLAVES['linux-gnueabi-arm'],
             'category': 'release',
             'builddir': '%s_repack' % platform,
             'factory': repack_factory
         })
+for platform in enUSDesktopPlatforms:
+    pf = mobileBranchConfig['platforms'][platform]
+    clobberTime = pf.get('clobber_time', branchConfig['default_clobber_time'])
+    packageGlobList = []
+    if platform == 'linux-i686':
+        packageGlobList = ['-r', 'mobile/dist/*.tar.bz2',
+                           'xulrunner/dist/*.tar.bz2']
+    elif platform == 'macosx-i686':
+        packageGlobList = ['-r', 'mobile/dist/*.dmg']
+    elif platform == 'win32-i686':
+        packageGlobList = ['-r', 'mobile/dist/*.zip',
+                           'xulrunner/dist/*.zip']
+    
+    build_factory = ReleaseMobileDesktopBuildFactory(
+        hgHost=branchConfig['hghost'],
+        repoPath=mozSourceRepoPath,
+        configRepoPath=branchConfig['config_repo_path'],
+        configSubDir=branchConfig['config_subdir'],
+        mozconfig=pf['mozconfig'],
+        env=pf['env'],
+        stageUsername=branchConfig['stage_username'],
+        stageGroup=branchConfig['stage_group'],
+        stageSshKey=branchConfig['stage_ssh_key'],
+        stageServer=branchConfig['stage_server'],
+        stageBasePath='%s/%s' % (candidatesPath, platform),
+        mobileRepoPath=mobileSourceRepoPath,
+        mozRevision='%s_RELEASE' % baseTag,
+        mobileRevision='%s_RELEASE' % baseTag,
+        platform=platform,
+        packageGlobList=packageGlobList,
+        baseWorkDir=pf['base_workdir'],
+        baseUploadDir=baseUploadDir,
+        buildToolsRepoPath=branchConfig['build_tools_repo_path'],
+        clobberURL=branchConfig['base_clobber_url'],
+        clobberTime=clobberTime,
+        buildSpace=10,
+        buildsBeforeReboot=pf['builds_before_reboot'],
+        triggerBuilds=False,
+    )
+
+    builders.append({
+        'name': 'mobile_%s_desktop_build' % platform,
+        'slavenames': pf['slaves'],
+        'category': 'release',
+        'builddir': 'mobile_%s_desktop_build' % platform,
+        'factory': build_factory
+    })
+
+    if platform in l10nDesktopPlatforms:
+        # Not implemented yet
+        pass
 
 if doPartnerRepacks:
     partner_repack_factory = PartnerRepackFactory(
         hgHost=branchConfig['hghost'],
         repoPath='mozSourceRepoPath',
         buildToolsRepoPath=branchConfig['build_tools_repo_path'],
         productName='mobile',
         version=version,
--- a/mozilla2/release-fennec-1.0.py
+++ b/mozilla2/release-fennec-1.0.py
@@ -25,16 +25,18 @@ mergeLocales        = False
 # appVersion, not version.
 version             = '1.0.1rc1'
 appVersion          = '1.0.1'
 milestone           = '1.9.2.1'
 buildNumber         = 1
 baseTag             = 'FENNEC_1_0_1rc1'
 enUSPlatforms       = ('maemo',)
 l10nPlatforms       = enUSPlatforms
+enUSDesktopPlatforms = ('linux-i686', 'macosx-i686', 'win32-i686')
+l10nDesktopPlatforms = ()
 talosTestPlatforms  = ()
 ftpServer           = 'ftp.mozilla.org'
 stagingServer       = 'stage.mozilla.org'
 stageBasePath       = '/home/ftp/pub/mobile/candidates'
 base_enUS_binaryURL = 'http://%s/pub/mozilla.org/mobile/candidates/%s-candidates/build%d' % (ftpServer, version, buildNumber)
 doPartnerRepacks    = True
 partnersRepoPath    = 'build/partner-repacks'
 partnerRepackPlatforms = ('maemo',)
--- a/mozilla2/release-fennec-1.1.py
+++ b/mozilla2/release-fennec-1.1.py
@@ -25,16 +25,18 @@ mergeLocales        = True
 # appVersion, not version.
 version             = '1.1b1'
 appVersion          = '1.1b1'
 milestone           = '1.9.2.5pre'
 buildNumber         = 1
 baseTag             = 'FENNEC_1_1b1'
 enUSPlatforms       = ('maemo',)
 l10nPlatforms       = enUSPlatforms
+enUSDesktopPlatforms = ('linux-i686', 'macosx-i686', 'win32-i686')
+l10nDesktopPlatforms = ()
 talosTestPlatforms  = ()
 ftpServer           = 'ftp.mozilla.org'
 stagingServer       = 'stage.mozilla.org'
 stageBasePath       = '/home/ftp/pub/mobile/candidates'
 base_enUS_binaryURL = 'http://%s/pub/mozilla.org/mobile/candidates/%s-candidates/build%d' % (ftpServer, version, buildNumber)
 doPartnerRepacks    = False
 partnersRepoPath    = 'build/partner-repacks'
 partnerRepackPlatforms = ('maemo',)
--- a/mozilla2/release_mobile_master.py
+++ b/mozilla2/release_mobile_master.py
@@ -6,17 +6,17 @@ import buildbotcustom.l10n
 import buildbotcustom.misc
 import buildbotcustom.process.factory
 
 from buildbotcustom.l10n import DependentL10n
 from buildbotcustom.misc import get_locales_from_json, \
                                 isHgPollerTriggered
 from buildbotcustom.process.factory import ReleaseTaggingFactory, \
   MultiSourceFactory, MaemoReleaseBuildFactory, MaemoReleaseRepackFactory, \
-  PartnerRepackFactory
+  PartnerRepackFactory, ReleaseMobileDesktopBuildFactory
 from buildbotcustom.changes.ftppoller import FtpPoller
 
 # this is where all of our important configuration is stored. build number,
 # version number, sign-off revisions, etc.
 import release_mobile_config
 reload(release_mobile_config)
 from release_mobile_config import *
 
@@ -72,23 +72,43 @@ for platform in enUSPlatforms:
             builderNames=['%s_repack' % platform],
             repoType='hg',
             branch=mobileSourceRepoPath,
             baseTag='%s_RELEASE' % baseTag,
             locales=platform_locales[platform],
             tree='release'
         )
         schedulers.append(repack_scheduler)
-    if doPartnerRepacks:
-        partner_scheduler = Dependent(
-            name='mobile_partner_repacks',
+for platform in enUSDesktopPlatforms:
+    build_scheduler = Dependent(
+        name='mobile_%s_desktop_build' % platform,
+        upstream=tag_scheduler,
+        builderNames=['mobile_%s_desktop_build' % platform]
+    )
+    schedulers.append(build_scheduler)
+    if platform in l10nDesktopPlatforms:
+        repack_scheduler = DependentL10n(
+            name='mobile_%s_desktop_repack' % platform,
+            platform=platform,
             upstream=build_scheduler,
-            builderNames=['mobile_partner_repack']
+            builderNames=['mobile_%s_desktop_repack' % platform],
+            repoType='hg',
+            branch=mobileSourceRepoPath,
+            baseTag='%s_RELEASE' % baseTag,
+            locales=platform_locales[platform],
+            tree='release'
         )
-        schedulers.append(partner_scheduler)
+        schedulers.append(repack_scheduler)
+if doPartnerRepacks:
+    partner_scheduler = Dependent(
+        name='mobile_partner_repacks',
+        upstream=build_scheduler,
+        builderNames=['mobile_partner_repack']
+    )
+    schedulers.append(partner_scheduler)
 
 ##### Builders
 repositories = {
     mozSourceRepoPath: {
         'revision': mozSourceRepoRevision,
         'relbranchOverride': mozRelbranchOverride,
         'bumpFiles': [],
     },
@@ -157,42 +177,50 @@ builders.append({
     'slavenames': branchConfig['platforms']['linux']['slaves'],
     'category': 'release',
     'builddir': 'mobile_source',
     'factory': mobile_source_factory
 })
 
 
 for platform in enUSPlatforms:
+    baseUploadDir='%s-candidates/build%d' % (version, buildNumber)
+    candidatesPath = '%s/%s' % (stageBasePath, baseUploadDir)
+    build_factory = None
+    repack_factory = None
+
     if platform == 'maemo':
         pf = mobileBranchConfig['platforms']['linux-gnueabi-arm']
+        clobberTime = pf.get('clobber_time', branchConfig['default_clobber_time'])
         mozconfig = 'linux/%s/release' % mobileSourceRepoName
         releaseWorkDir  = pf['base_workdir'] + '-release'
         releaseBuildDir = pf['base_builddir'] + '-release'
         build_factory = MaemoReleaseBuildFactory(
             env=pf['env'],
             hgHost=branchConfig['hghost'],
             repoPath=mozSourceRepoPath,
             configRepoPath=branchConfig['config_repo_path'],
             configSubDir=branchConfig['config_subdir'],
             mozconfig=mozconfig,
             stageUsername=branchConfig['stage_username'],
             stageServer=branchConfig['stage_server'],
-            stageBasePath='%s/%s-candidates/build%d' % (stageBasePath,
-                                                        version, buildNumber),
             stageSshKey=branchConfig['stage_ssh_key'],
+            stageBasePath=candidatesPath,
             mobileRepoPath=mobileSourceRepoPath,
             mozRevision='%s_RELEASE' % baseTag,
             mobileRevision='%s_RELEASE' % baseTag,
             l10nTag='%s_RELEASE' % baseTag,
             platform='linux-gnueabi-arm',
+            buildsBeforeReboot=pf['builds_before_reboot'],
             baseWorkDir=releaseWorkDir,
             baseBuildDir=releaseBuildDir,
-            baseUploadDir='%s-candidates/build%d' % (version, buildNumber),
+            baseUploadDir=baseUploadDir,
             buildToolsRepoPath=branchConfig['build_tools_repo_path'],
+            clobberURL=branchConfig['base_clobber_url'],
+            clobberTime=clobberTime,
             buildSpace=10,
             mergeLocales=mergeLocales,
             locales=platform_locales['maemo-multilocale'].keys(),
             multiLocale=mobileBranchConfig['enable_multi_locale'],
             l10nRepoPath=l10nRepoPath,
             triggerBuilds=False,
         )
 
@@ -238,16 +266,73 @@ for platform in enUSPlatforms:
         builders.append({
             'name': '%s_repack' % platform,
             'slavenames': MOBILE_L10N_SLAVES['linux-gnueabi-arm'],
             'category': 'release',
             'builddir': '%s_repack' % platform,
             'factory': repack_factory
         })
 
+for platform in enUSDesktopPlatforms:
+    baseUploadDir='%s-candidates/build%d' % (version, buildNumber)
+    candidatesPath = '%s/%s' % (stageBasePath, baseUploadDir)
+    build_factory = None
+    repack_factory = None
+
+    pf = mobileBranchConfig['platforms'][platform]
+    clobberTime = pf.get('clobber_time', branchConfig['default_clobber_time'])
+    packageGlobList = []
+    if platform == 'linux-i686':
+        packageGlobList = ['-r', 'mobile/dist/*.tar.bz2',
+                           'xulrunner/dist/*.tar.bz2']
+    elif platform == 'macosx-i686':
+        packageGlobList = ['-r', 'mobile/dist/*.dmg']
+    elif platform == 'win32-i686':
+        packageGlobList = ['-r', 'mobile/dist/*.zip',
+                           'xulrunner/dist/*.zip']
+    
+    build_factory = ReleaseMobileDesktopBuildFactory(
+        hgHost=branchConfig['hghost'],
+        repoPath=mozSourceRepoPath,
+        configRepoPath=branchConfig['config_repo_path'],
+        configSubDir=branchConfig['config_subdir'],
+        mozconfig=pf['mozconfig'],
+        env=pf['env'],
+        stageUsername=branchConfig['stage_username'],
+        stageGroup=branchConfig['stage_group'],
+        stageSshKey=branchConfig['stage_ssh_key'],
+        stageServer=branchConfig['stage_server'],
+        stageBasePath='%s/%s' % (candidatesPath, platform),
+        mobileRepoPath=mobileSourceRepoPath,
+        mozRevision='%s_RELEASE' % baseTag,
+        mobileRevision='%s_RELEASE' % baseTag,
+        platform=platform,
+        packageGlobList=packageGlobList,
+        baseWorkDir=pf['base_workdir'],
+        baseUploadDir=baseUploadDir,
+        buildToolsRepoPath=branchConfig['build_tools_repo_path'],
+        clobberURL=branchConfig['base_clobber_url'],
+        clobberTime=clobberTime,
+        buildSpace=10,
+        buildsBeforeReboot=pf['builds_before_reboot'],
+        triggerBuilds=False,
+    )
+
+    builders.append({
+        'name': 'mobile_%s_desktop_build' % platform,
+        'slavenames': pf['slaves'],
+        'category': 'release',
+        'builddir': 'mobile_%s_desktop_build' % platform,
+        'factory': build_factory
+    })
+
+    if platform in l10nDesktopPlatforms:
+        # Not implemented yet
+        pass
+
 if doPartnerRepacks:
     partner_repack_factory = PartnerRepackFactory(
         hgHost=branchConfig['hghost'],
         repoPath='mozRepoPath',
         buildToolsRepoPath=branchConfig['build_tools_repo_path'],
         productName='mobile',
         version=version,
         buildNumber=buildNumber,