Bug 1595696 - Shift artifact namespace transformation to the job class definition. r=chmanchester

Differential Revision: https://phabricator.services.mozilla.com/D52631

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Geoff Lankow 2019-11-20 19:01:26 +00:00
Родитель 9d477bcb3a
Коммит ada7694a92
1 изменённых файлов: 23 добавлений и 10 удалений

Просмотреть файл

@ -330,6 +330,20 @@ class ArtifactJob(object):
destpath = mozpath.join('host/bin', orig_basename)
writer.add(destpath.encode('utf-8'), open(filename, 'rb'))
@staticmethod
def transform_job(job, tree):
# PGO builds are now known as "shippable" for all platforms but Android.
# For macOS and linux32 shippable builds are equivalent to opt builds and
# replace them on some trees. Additionally, we no longer produce win64
# opt builds on integration branches.
if job.endswith('-pgo') or job in ('macosx64-opt', 'linux-opt',
'win64-opt'):
tree += '.shippable'
if job.endswith('-pgo'):
job = job.replace('-pgo', '-opt')
return job, tree
class AndroidArtifactJob(ArtifactJob):
package_re = r'public/build/geckoview_example\.apk'
@ -390,6 +404,10 @@ class AndroidArtifactJob(ArtifactJob):
writer.add(destpath.encode('utf-8'),
gzip.GzipFile(fileobj=reader[filename].uncompressed_data))
@staticmethod
def transform_job(job, tree):
return job, tree
class LinuxArtifactJob(ArtifactJob):
package_re = r'public/build/target\.tar\.bz2'
@ -614,6 +632,10 @@ class ThunderbirdMixin(object):
]
try_tree = 'try-comm-central'
@staticmethod
def transform_job(job, tree):
return job, tree
class LinuxThunderbirdArtifactJob(ThunderbirdMixin, LinuxArtifactJob):
pass
@ -796,16 +818,7 @@ class TaskCache(CacheManager):
# 'mozilla-inbound'
tree = tree.split('/')[1] if '/' in tree else tree
# PGO builds are now known as "shippable" for all platforms but Android.
# For macOS and linux32 shippable builds are equivalent to opt builds and
# replace them on some trees. Additionally, we no longer produce win64
# opt builds on integration branches.
if not job.startswith('android-'):
if job.endswith('-pgo') or job in ('macosx64-opt', 'linux-opt',
'win64-opt'):
tree += '.shippable'
if job.endswith('-pgo'):
job = job.replace('-pgo', '-opt')
job, tree = artifact_job_class.transform_job(job, tree)
namespace = '{trust_domain}.v2.{tree}.revision.{rev}.{product}.{job}'.format(
trust_domain=artifact_job_class.trust_domain,