Bug 1311632 - Update route and package names for android artifact builds to reflect gecko.v2 index locations. r=mshal draft
authorChris Manchester <cmanchester@mozilla.com>
Thu, 20 Oct 2016 12:33:44 -0700
changeset 427680 01f171ae40c015b00a8cb7689f7afe7f723be1ee
parent 427338 99a239e1866a57f987b08dad796528e4ea30e622
child 534538 e350b34576375d0757f66e894b6e4c1dd526db05
push id33094
push userbmo:cmanchester@mozilla.com
push dateThu, 20 Oct 2016 19:34:17 +0000
reviewersmshal
bugs1311632
milestone52.0a1
Bug 1311632 - Update route and package names for android artifact builds to reflect gecko.v2 index locations. r=mshal MozReview-Commit-ID: 3QtL0bj18x2
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -430,18 +430,20 @@ class WinArtifactJob(ArtifactJob):
                              'matched an archive path.'.format(
                                  patterns=self.artifact_patterns))
 
 # Keep the keys of this map in sync with the |mach artifact| --job
 # options.  The keys of this map correspond to entries at
 # https://tools.taskcluster.net/index/artifacts/#gecko.v2.mozilla-central.latest/gecko.v2.mozilla-central.latest
 # The values correpsond to a pair of (<package regex>, <test archive regex>).
 JOB_DETAILS = {
-    'android-api-15': (AndroidArtifactJob, ('public/build/fennec-(.*)-arm\.apk',
-                                            None)),
+    'android-api-15-opt': (AndroidArtifactJob, ('public/build/target.apk',
+                                                None)),
+    'android-api-15-debug': (AndroidArtifactJob, ('public/build/target.apk',
+                                                  None)),
     'android-x86': (AndroidArtifactJob, ('public/build/fennec-(.*)-i386\.apk',
                                          None)),
     'linux-opt': (LinuxArtifactJob, ('public/build/firefox-(.*)\.linux-i686\.tar\.bz2',
                                      'public/build/firefox-(.*)\.common\.tests\.zip')),
     'linux-debug': (LinuxArtifactJob, ('public/build/firefox-(.*)\.linux-i686\.tar\.bz2',
                                  'public/build/firefox-(.*)\.common\.tests\.zip')),
     'linux64-opt': (LinuxArtifactJob, ('public/build/firefox-(.*)\.linux-x86_64\.tar\.bz2',
                                        'public/build/firefox-(.*)\.common\.tests\.zip')),
@@ -655,17 +657,17 @@ class TaskCache(CacheManager):
         for artifact_name in artifact_job.find_candidate_artifacts(artifacts):
             # We can easily extract the task ID from the URL.  We can't easily
             # extract the build ID; we use the .ini files embedded in the
             # downloaded artifact for this.  We could also use the uploaded
             # public/build/buildprops.json for this purpose.
             url = self._queue.buildUrl('getLatestArtifact', taskId, artifact_name)
             urls.append(url)
         if not urls:
-            raise ValueError('Task for {key} existed, but no artifacts found!'.format(key=key))
+            raise ValueError('Task for {namespace} existed, but no artifacts found!'.format(namespace=namespace))
         return urls
 
     def print_last_item(self, args, sorted_kwargs, result):
         tree, job, rev = args
         self.log(logging.INFO, 'artifact',
             {'rev': rev},
             'Last installed binaries from hg parent revision {rev}')
 
@@ -790,32 +792,32 @@ class Artifacts(object):
         self._artifact_cache = ArtifactCache(self._cache_dir, log=self._log, skip_cache=self._skip_cache)
         self._pushhead_cache = PushheadCache(self._cache_dir, log=self._log, skip_cache=self._skip_cache)
 
     def log(self, *args, **kwargs):
         if self._log:
             self._log(*args, **kwargs)
 
     def _guess_artifact_job(self):
-        if self._substs.get('MOZ_BUILD_APP', '') == 'mobile/android':
-            if self._substs['ANDROID_CPU_ARCH'] == 'x86':
-                return 'android-x86'
-            return 'android-api-15'
-
-        target_64bit = False
-        if self._substs['target_cpu'] == 'x86_64':
-            target_64bit = True
-
         # Add the "-debug" suffix to the guessed artifact job name
         # if MOZ_DEBUG is enabled.
         if self._substs.get('MOZ_DEBUG'):
             target_suffix = '-debug'
         else:
             target_suffix = '-opt'
 
+        if self._substs.get('MOZ_BUILD_APP', '') == 'mobile/android':
+            if self._substs['ANDROID_CPU_ARCH'] == 'x86':
+                return 'android-x86'
+            return 'android-api-15' + target_suffix
+
+        target_64bit = False
+        if self._substs['target_cpu'] == 'x86_64':
+            target_64bit = True
+
         if self._defines.get('XP_LINUX', False):
             return ('linux64' if target_64bit else 'linux') + target_suffix
         if self._defines.get('XP_WIN', False):
             return ('win64' if target_64bit else 'win32') + target_suffix
         if self._defines.get('XP_MACOSX', False):
             # We only produce unified builds in automation, so the target_cpu
             # check is not relevant.
             return 'macosx64' + target_suffix