Bug 1534522 - Allow to specify different task ids for artifacts. r=dmajor
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 13 Mar 2019 23:08:06 +0000
changeset 521800 2382b92cba1ef6ad62b732179e7be14deecaa6b6
parent 521799 056391cf2e01d3ca35f89a659ba406a6e144bda3
child 521801 0806b72566051e6cd9267731c15369bf51cab9d1
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1534522, 1528123
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1534522 - Allow to specify different task ids for artifacts. r=dmajor Bug 1528123 added a way to specify a task id to influence mach artifact. In the case of upcoming EME-enabled win64-aarch64 builds, we need to be able to specify two different task ids, which a single environment variable doesn't really allow. So extend the scheme to check environment variables with the build type included in the variable name. Differential Revision: https://phabricator.services.mozilla.com/D23101
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -1266,18 +1266,22 @@ class Artifacts(object):
             return self.install_from_url(source, distdir)
         else:
             if source is None and 'MOZ_ARTIFACT_REVISION' in os.environ:
                 source = os.environ['MOZ_ARTIFACT_REVISION']
 
             if source:
                 return self.install_from_revset(source, distdir)
 
-            if 'MOZ_ARTIFACT_TASK' in os.environ:
-                return self.install_from_task(os.environ['MOZ_ARTIFACT_TASK'], distdir)
+            for var in (
+                'MOZ_ARTIFACT_TASK_%s' % self._job.upper().replace('-', '_'),
+                'MOZ_ARTIFACT_TASK',
+            ):
+                if var in os.environ:
+                    return self.install_from_task(os.environ[var], distdir)
 
             return self.install_from_recent(distdir)
 
 
     def clear_cache(self):
         self.log(logging.INFO, 'artifact',
             {},
             'Deleting cached artifacts and caches.')