Merging from default production-0.8 FENNEC_38_0b1_BUILD1 FENNEC_38_0b1_RELEASE FIREFOX_38_0b1_BUILD1 FIREFOX_38_0b1_RELEASE
authorJordan Lund <jlund@mozilla.com>
Mon, 30 Mar 2015 09:40:07 -0700
branchproduction-0.8
changeset 4165 f429fd5ac7a6c3070b3881ea903f88f75aed98d9
parent 4164 dd75e8ff9b46f16caf6168b38b65c20d9704dcc9 (current diff)
parent 4163 6c2b489f2866731afc7f45f7d91cf29acc33da74 (diff)
child 4166 083fe71d8dc29c8c2adfb74abb2ff1db71db9a4b
push id3469
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 16:40:09 +0000
bugs740142, 1148966
Merging from default changeset: 4162:ccba2a403d0e parent: 4160:3d4d36c4d439 user: Massimo Gervasini <mgervasini@mozilla.com> date: Fri Mar 27 20:18:22 2015 +0100 summary: Bug 740142 - Updated builder and slavebuilddir names for mozharness l10n.r=catlee changeset: 4163:6c2b489f2866 user: Rail Aliiev <rail@mozilla.com> date: Mon Mar 30 03:51:38 2015 -0400 summary: Bug 1148966 - Use container based travis CI to improve test wait times. r=Callek
misc.py
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,31 @@
 language: python
 python:
   - "2.7"
 
+sudo: false
+
+env:
+  global:
+    - PIP_FIND_LINKS=file://$HOME/.cache/pip
+    - PIP_CACHE_DIR=$HOME/.cache/pip
+
+cache:
+  directories:
+    - $HOME/.cache/pip
+    - $TRAVIS_BUILD_DIR/.tox
+
 install:
   - pip install tox
 
 script:
   - tox
+  # Remove logs to avoid cache uploads
+  - rm -rf $HOME/.cache/pip/log
 
 after_script:
   - tox -e py27-coveralls
 
 # currently cannot customise per user fork, see:
 # https://github.com/travis-ci/travis-ci/issues/1094
 # please comment out this section in your personal fork!
 notifications:
--- a/misc.py
+++ b/misc.py
@@ -1243,18 +1243,18 @@ def generateBranchObjects(config, name, 
                 l10n_builder = '%s %s %s l10n nightly' % (
                     pf['product_name'].capitalize(), name, platform
                 )
 
             # Fill the l10nNightly dict
             # trying to do repacks with mozharness
             if is_l10n_with_mh(config, platform):
                 # we need this later...
-                builder_names = mh_l10n_builder_names(config, platform,
-                                                    is_nightly=True)
+                builder_names = mh_l10n_builder_names(config, platform, branch=name,
+                                                      is_nightly=True)
                 scheduler_name = mh_l10n_scheduler_name(config, platform)
                 l10nNightlyBuilders[builder] = {}
                 l10nNightlyBuilders[builder]['l10n_builder'] = builder_names
                 l10nNightlyBuilders[builder]['platform'] = platform
                 l10nNightlyBuilders[builder]['scheduler_name'] = scheduler_name
                 l10nNightlyBuilders[builder]['l10n_repacks_with_mh'] = True
             else:
                 # no repacks with mozharness, old style repacks
@@ -3292,34 +3292,35 @@ def mh_l10n_builders(config, platform, b
     # reboot command and python interpreter are defined per platform
     mozharness_python = pf.get('mozharness_python')
     reboot_command = pf['reboot_command']
     scriptRepo = '%s%s' % (config['hgurl'],
                            config['mozharness_repo_path'])
     # repacks specific configuration is in:
     # platform > mozharness_desktop_l10n
     repacks = pf['mozharness_desktop_l10n']
+    product_name = pf['product_name'].capitalize()
     scriptName = repacks['scriptName']
     l10n_chunks = repacks['l10n_chunks']
     use_credentials_file = repacks['use_credentials_file']
     config_dir = 'single_locale'
     branch_config = os.path.join(config_dir, '%s.py' % branch)
     platform_config = os.path.join(config_dir, '%s.py' % platform)
     environment_config = os.path.join(config_dir, 'production.py')
     balrog_config = os.path.join('balrog', 'production.py')
     if config.get('staging', False):
         environment_config = os.path.join(config_dir, 'staging.py')
         balrog_config = os.path.join('balrog', 'staging.py')
     # desktop repacks run in chunks...
-    builder_names = mh_l10n_builder_names(config, platform, is_nightly)
+    builder_names = mh_l10n_builder_names(config, platform, branch, is_nightly)
     this_chunk = 0
     for bn in builder_names:
         this_chunk += 1
         builderName = bn
-        builddir = mh_l10n_builddir_from_builder_name(bn)
+        builddir = mh_l10n_builddir_from_builder_name(bn, product_name)
         extra_args = ['--branch-config', branch_config,
                       '--platform-config', platform_config,
                       '--environment-config', environment_config,
                       '--balrog-config', balrog_config,
                       '--total-chunks', str(l10n_chunks),
                       '--this-chunk', str(this_chunk)]
         signing_servers = secrets.get(pf.get('nightly_signing_servers'))
         factory = SigningScriptFactory(
@@ -3348,33 +3349,41 @@ def mh_l10n_builders(config, platform, b
                            'platform': platform,
                            'slavebuilddir': slavebuilddir,
                            'script_repo_revision': config['mozharness_tag'], },
             'env': builder_env
         })
     return builders
 
 
-def mh_l10n_builddir_from_builder_name(builder_name):
+def mh_l10n_builddir_from_builder_name(builder_name, product_name):
     """transforms a builder name into a builddir"""
-    b_dir = builder_name.replace(' nightly', '')
-    b_dir = b_dir.replace(' ', '-')
+    # builder name is Firefox ash linux nightly l10n 1/3
+    # we need: ash-lx-ntly-l10n-1_3-000000000
+    # replace spaces with -
+    b_dir = builder_name.replace(' ', '-')
+    # remove product name
+    b_dir = b_dir.replace('%s-' % product_name, '')
+    # replaces / with _
     return b_dir.replace('/', '_')
 
 
 def mh_l10n_scheduler_name(config, platform):
     pf = config['platforms'][platform]
     return '%s nightly l10n' % (pf['base_name'])
 
 
-def mh_l10n_builder_names(config, platform, is_nightly):
+def mh_l10n_builder_names(config, platform, branch, is_nightly):
     # let's check if we need to create builders for this config/platform
     names = []
     pf = config['platforms'][platform]
-    name = pf['base_name']
+    product_name = pf['product_name']
+    name = '%s %s %s' % (product_name, branch, platform)
+    name = name.capitalize()
     if is_nightly:
-        name = '%s nightly' % (pf['base_name'])
+        name = '%s nightly' % (name)
     repacks = pf['mozharness_desktop_l10n']
+
     l10n_chunks = repacks['l10n_chunks']
     for chunk in range(1, l10n_chunks + 1):
         builder_name = "%s l10n %s/%s" % (name, chunk, l10n_chunks)
         names.append(builder_name)
     return names
--- a/tox_env.sh
+++ b/tox_env.sh
@@ -3,17 +3,17 @@
 TOX_DIR="${1}"
 
 function hgme {
     repo="${1}"
     if [ ! -d "${TOX_DIR}/${repo}" ]; then
         hg clone https://hg.mozilla.org/build/${repo} "${TOX_DIR}/${repo}"
     else
         # this is equivalent to hg purge but doesn't require the hg purge plugin to be enabled
-        hg status -un0 -R "${TOX_DIR}/${repo}" | xargs rm -rf
+        hg status -un0 -R "${TOX_DIR}/${repo}" | xargs --no-run-if-empty --null rm -rf
         hg pull -u -R "${TOX_DIR}/${repo}"
     fi
 }
 
 hgme tools
 hgme buildbot
 
 # top level dir has a __init__.py so the package name is the same as the directory