Backed out 2 changesets (bug 1557269) for causing bustage because of maven zip not being found CLOSED TREE

Backed out changeset e3d495f69dfb (bug 1557269)
Backed out changeset b469d332f316 (bug 1557269)
This commit is contained in:
shindli 2019-07-01 18:10:05 +03:00
Родитель bbcf0bde8c
Коммит 5715d5b394
13 изменённых файлов: 211 добавлений и 208 удалений

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

@ -9,6 +9,8 @@ import logging
import os
import json
from zipfile import ZipFile
import mozpack.path as mozpath
from mozbuild.base import (
@ -414,7 +416,13 @@ class MachCommands(MachCommandBase):
self.substs['GRADLE_ANDROID_ARCHIVE_GECKOVIEW_TASKS'] + args,
verbose=True)
return ret
if ret != 0:
return ret
# The zip archive is passed along in CI to ship geckoview onto a maven repo
_craft_maven_zip_archive(self.topobjdir)
return 0
@SubCommand('android', 'build-geckoview_example',
"""Build geckoview_example """)
@ -712,6 +720,26 @@ class MachCommands(MachCommandBase):
return 0
def _get_maven_archive_abs_and_relative_paths(maven_folder):
for subdir, _, files in os.walk(maven_folder):
for file in files:
full_path = os.path.join(subdir, file)
relative_path = os.path.relpath(full_path, maven_folder)
# maven-metadata is intended to be generated on the real maven server
if 'maven-metadata.xml' not in relative_path:
yield full_path, relative_path
def _craft_maven_zip_archive(topobjdir):
geckoview_folder = os.path.join(topobjdir, 'gradle/build/mobile/android/geckoview')
maven_folder = os.path.join(geckoview_folder, 'maven')
with ZipFile(os.path.join(geckoview_folder, 'target.maven.zip'), 'w') as target_zip:
for abs, rel in _get_maven_archive_abs_and_relative_paths(maven_folder):
target_zip.write(abs, arcname=rel)
@CommandProvider
class AndroidEmulatorCommands(MachCommandBase):
"""

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

@ -10,7 +10,7 @@ transforms:
- taskgraph.transforms.task:transforms
kind-dependencies:
- build-signing
- build # geckoview builds aren't signed
only-for-attributes:
- nightly

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

@ -3,8 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
job-defaults:
attributes:
artifact_map: taskcluster/taskgraph/manifests/fennec_geckoview.yml
index:
product: mobile
worker:
@ -13,9 +11,9 @@ job-defaults:
env:
GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-offline"
artifacts:
- name: public/build/maven
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
type: directory
- name: public/build/target.maven.zip
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/target.maven.zip
type: file
- name: public/build/geckoview-androidTest.apk
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/outputs/apk/androidTest/withGeckoBinaries/debug/geckoview-withGeckoBinaries-debug-androidTest.apk
type: file
@ -538,6 +536,14 @@ android-geckoview-fat-aar/opt:
MOZ_ARTIFACT_TASK_ANDROID_AARCH64_OPT: {task-reference: '<android-aarch64-opt>'}
MOZ_ARTIFACT_TASK_ANDROID_X86_OPT: {task-reference: '<android-x86-opt>'}
MOZ_ARTIFACT_TASK_ANDROID_X86_64_OPT: {task-reference: '<android-x86_64-opt>'}
artifacts:
- name: public/android/maven
# TODO Bug 1433198. Remove the following entry once target.maven.zip is uploaded to a maven repository
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/
type: directory
- name: public/build/target.maven.zip
path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/target.maven.zip
type: file
run:
actions: [get-secrets, build]
config: ["builds/releng_base_android_64_builds.py"]

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

@ -8,96 +8,72 @@ default_locales: # Ignored for geckoview
- en-US
tasktype_map: # Map task reference to task type.
build: build
build-signing: signing
base_artifact_prefix: ''
# A default entry, which the mappings below extend and override.
# Final 'destinations' will be the product of:
# s3_bucket_paths + destinations + locale_prefix + pretty_name
default: &default
from:
- build
locale_prefix: ''
source_path_modifier: maven/org/mozilla/geckoview/${artifact_id}/${major_version}.${minor_version}.${build_date}
source_path_modifier: org/mozilla/geckoview/${artifact_id}/${major_version}.${minor_version}.${build_date}
description: "TO_BE_OVERRIDDEN"
destinations: # locale_prefix is appended
- org/mozilla/geckoview/${artifact_id}/${major_version}.${minor_version}.${build_date}
# Configuration for individual files. Extends 'default', above.
upstream_mapping:
target.maven.zip:
from:
- build
mapping:
${artifact_id}-${major_version}.${minor_version}.${build_date}.aar:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar
${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.asc:
<<: *default
from: ['build-signing']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.asc
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.asc
${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.md5:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.md5
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.md5
${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.sha1:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.sha1
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.sha1
${artifact_id}-${major_version}.${minor_version}.${build_date}.pom:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom
${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.asc:
<<: *default
from: ['build-signing']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.asc
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.asc
${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.md5:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.md5
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.md5
${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.sha1:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.sha1
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.sha1
${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar
${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.asc:
<<: *default
from: ['build-signing']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.asc
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.asc
${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.md5:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.md5
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.md5
${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.sha1:
<<: *default
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.sha1
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.sha1
${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.md5:
<<: *default
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.md5
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar.md5
${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.sha1:
<<: *default
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.sha1
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.sha1
${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar:
<<: *default
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar
${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.md5:
<<: *default
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.md5
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom.md5
${artifact_id}-${major_version}.${minor_version}.${build_date}.pom:
<<: *default
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.pom
${artifact_id}-${major_version}.${minor_version}.${build_date}.aar:
<<: *default
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}.aar
${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.md5:
<<: *default
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.md5
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.md5
${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.sha1:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.sha1
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-javadoc.jar.sha1
${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar
${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.asc:
<<: *default
from: ['build-signing']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.asc
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.asc
${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.md5:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.md5
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.md5
${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.sha1:
<<: *default
from: ['build']
pretty_name: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.sha1
checksums_path: ${artifact_id}-${major_version}.${minor_version}.${build_date}-sources.jar.sha1

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

@ -7,25 +7,37 @@ Transform the beetmover task into an actual task description.
from __future__ import absolute_import, print_function, unicode_literals
from copy import deepcopy
import re
from taskgraph.loader.single_dep import schema
from taskgraph.transforms.base import TransformSequence
from taskgraph.transforms.beetmover import \
craft_release_properties as beetmover_craft_release_properties
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.declarative_artifacts import (
get_geckoview_template_vars,
get_geckoview_upstream_artifacts,
get_geckoview_artifact_id,
)
from taskgraph.util.schema import resolve_keyed_by, optionally_keyed_by
from taskgraph.util.scriptworker import (generate_beetmover_artifact_map,
generate_beetmover_compressed_upstream_artifacts,
get_worker_type_for_scope)
from taskgraph.transforms.task import task_description_schema
from voluptuous import Required, Optional
_ARTIFACT_ID_PER_PLATFORM = {
'android-aarch64': 'geckoview{update_channel}-arm64-v8a',
'android-api-16': 'geckoview{update_channel}-armeabi-v7a',
'android-x86': 'geckoview{update_channel}-x86',
'android-x86_64': 'geckoview{update_channel}-x86_64',
'android-geckoview-fat-aar': 'geckoview{update_channel}',
}
_MOZ_UPDATE_CHANNEL_PER_BRANCH = {
'mozilla-release': '',
'mozilla-beta': '-beta',
'mozilla-central': '-nightly',
'try': '-nightly-try',
'maple': '-nightly-maple',
}
beetmover_description_schema = schema.extend({
Required('depname', default='build'): basestring,
Optional('label'): basestring,
@ -85,8 +97,7 @@ def make_task_description(config, jobs):
)
)
dependencies = deepcopy(dep_job.dependencies)
dependencies[dep_job.kind] = dep_job.label
dependencies = {dep_job.kind: dep_job.label}
attributes = copy_attributes_from_dependent_job(dep_job)
attributes.update(job.get('attributes', {}))
@ -111,38 +122,62 @@ def make_task_description(config, jobs):
yield task
def generate_upstream_artifacts(build_task_ref):
return [{
'taskId': {'task-reference': build_task_ref},
'taskType': 'build',
'paths': ['public/build/target.maven.zip'],
'zipExtract': True,
}]
@transforms.add
def make_task_worker(config, jobs):
for job in jobs:
valid_beetmover_job = set(job['dependencies'].keys()) == {'build', 'build-signing'}
valid_beetmover_job = len(job['dependencies']) == 1 and 'build' in job['dependencies']
if not valid_beetmover_job:
raise NotImplementedError(
'Beetmover-geckoview must have 2 dependencies: build and build-signing. '
'Got: {}'.format(
'Beetmover-geckoview must have a single dependency. Got: {}'.format(
job['dependencies']
)
)
job['worker'] = {
'artifact-map': generate_beetmover_artifact_map(
config,
job,
**get_geckoview_template_vars(config, job['attributes']['build_platform'])
),
worker = {
'implementation': 'beetmover-maven',
'release-properties': craft_release_properties(config, job),
'upstream-artifacts': get_geckoview_upstream_artifacts(config, job),
}
upstream_artifacts = generate_beetmover_compressed_upstream_artifacts(job)
worker['upstream-artifacts'] = upstream_artifacts
version_groups = re.match(r'(\d+).(\d+).*', config.params['version'])
if version_groups:
major_version, minor_version = version_groups.groups()
template_vars = {
'artifact_id': worker['release-properties']['artifact-id'],
'build_date': config.params['moz_build_date'],
'major_version': major_version,
'minor_version': minor_version,
}
worker['artifact-map'] = generate_beetmover_artifact_map(
config, job, **template_vars)
job["worker"] = worker
yield job
def craft_release_properties(config, job):
release_properties = beetmover_craft_release_properties(config, job)
props = beetmover_craft_release_properties(config, job)
release_properties['artifact-id'] = get_geckoview_artifact_id(
job['attributes']['build_platform'], release_properties['branch']
platform = props['platform']
update_channel = _MOZ_UPDATE_CHANNEL_PER_BRANCH.get(
props['branch'], '-UNKNOWN_MOZ_UPDATE_CHANNEL'
)
release_properties['app-name'] = 'geckoview'
artifact_id = _ARTIFACT_ID_PER_PLATFORM[platform].format(update_channel=update_channel)
props['artifact-id'] = artifact_id
props['app-name'] = 'geckoview' # this beetmover job is not about pushing Fennec
return release_properties
return props

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

@ -8,7 +8,6 @@ Transform the signing task into an actual task description.
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.signed_artifacts import generate_specifications_of_artifacts_to_sign
from taskgraph.util.taskcluster import get_artifact_path
@ -51,11 +50,8 @@ def define_upstream_artifacts(config, jobs):
dep_job = job['primary-dependency']
build_platform = dep_job.attributes.get('build_platform')
job['attributes'] = copy_attributes_from_dependent_job(dep_job)
artifacts_specifications = generate_specifications_of_artifacts_to_sign(
config,
job,
dep_job,
keep_locale_template=False,
kind=config.kind,
)

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

@ -8,7 +8,6 @@ Transform the signing task into an actual task description.
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.attributes import copy_attributes_from_dependent_job
from taskgraph.util.signed_artifacts import generate_specifications_of_artifacts_to_sign
from taskgraph.util.treeherder import join_symbol
@ -38,11 +37,8 @@ def define_upstream_artifacts(config, jobs):
for job in jobs:
dep_job = job['primary-dependency']
job['attributes'] = copy_attributes_from_dependent_job(dep_job)
locale_specifications = generate_specifications_of_artifacts_to_sign(
config,
job,
dep_job,
keep_locale_template=True,
)

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

@ -26,7 +26,6 @@ def define_upstream_artifacts(config, jobs):
dep_job = job['primary-dependency']
repack_id = job['extra']['repack_id']
artifacts_specifications = generate_specifications_of_artifacts_to_sign(
config,
dep_job,
keep_locale_template=True,
kind=config.kind,

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

@ -42,9 +42,6 @@ signing_description_schema = schema.extend({
# depname is used in taskref's to identify the taskID of the unsigned things
Required('depname'): basestring,
# attributes for this task
Optional('attributes'): {basestring: object},
# unique label to describe this signing task, defaults to {dep.label}-signing
Optional('label'): basestring,
@ -140,8 +137,7 @@ def make_task_description(config, jobs):
)
)
attributes = job['attributes'] if job.get('attributes') else \
copy_attributes_from_dependent_job(dep_job)
attributes = copy_attributes_from_dependent_job(dep_job)
attributes['signed'] = True
if dep_job.attributes.get('chunk_locales'):

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

@ -35,7 +35,6 @@ RELEASE_PROMOTION_PROJECTS = {
} | RELEASE_PROJECTS
_OPTIONAL_ATTRIBUTES = (
'artifact_map',
'artifact_prefix',
'l10n_chunk',
'locale',

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

@ -1,51 +0,0 @@
from __future__ import absolute_import, unicode_literals
import re
from taskgraph.util.scriptworker import generate_beetmover_upstream_artifacts
_ARTIFACT_ID_PER_PLATFORM = {
'android-aarch64-nightly': 'geckoview{update_channel}-arm64-v8a',
'android-api-16-nightly': 'geckoview{update_channel}-armeabi-v7a',
'android-x86-nightly': 'geckoview{update_channel}-x86',
'android-x86_64-nightly': 'geckoview{update_channel}-x86_64',
'android-geckoview-fat-aar-nightly': 'geckoview{update_channel}',
}
_MOZ_UPDATE_CHANNEL_PER_PROJECT = {
'mozilla-release': '',
'mozilla-beta': '-beta',
'mozilla-central': '-nightly',
'try': '-nightly-try',
'maple': '-nightly-maple',
}
def get_geckoview_upstream_artifacts(config, job):
upstream_artifacts = generate_beetmover_upstream_artifacts(
config, job, platform='',
**get_geckoview_template_vars(config, job['attributes']['build_platform'])
)
return [{
key: value for key, value in upstream_artifact.items()
if key != 'locale'
} for upstream_artifact in upstream_artifacts]
def get_geckoview_template_vars(config, platform):
version_groups = re.match(r'(\d+).(\d+).*', config.params['version'])
if version_groups:
major_version, minor_version = version_groups.groups()
return {
'artifact_id': get_geckoview_artifact_id(platform, config.params['project']),
'build_date': config.params['moz_build_date'],
'major_version': major_version,
'minor_version': minor_version,
}
def get_geckoview_artifact_id(platform, project):
update_channel = _MOZ_UPDATE_CHANNEL_PER_PROJECT.get(project, '-UNKNOWN_MOZ_UPDATE_CHANNEL')
return _ARTIFACT_ID_PER_PLATFORM[platform].format(update_channel=update_channel)

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

@ -409,9 +409,7 @@ def get_worker_type_for_scope(config, scope):
# generate_beetmover_upstream_artifacts {{{1
def generate_beetmover_upstream_artifacts(
config, job, platform, locale=None, dependencies=None, **kwargs
):
def generate_beetmover_upstream_artifacts(config, job, platform, locale=None, dependencies=None):
"""Generate the upstream artifacts for beetmover, using the artifact map.
Currently only applies to beetmover tasks.
@ -445,12 +443,7 @@ def generate_beetmover_upstream_artifacts(
locales = [locale]
if not dependencies:
if job.get('dependencies'):
dependencies = job['dependencies'].keys()
elif job.get('primary-dependency'):
dependencies = [job['primary-dependency'].kind]
else:
raise Exception('Unsupported type of dependency. Got job: {}'.format(job))
dependencies = job['dependencies'].keys()
for locale, dep in itertools.product(locales, dependencies):
paths = list()
@ -472,23 +465,16 @@ def generate_beetmover_upstream_artifacts(
file_config = deepcopy(map_config['mapping'][filename])
resolve_keyed_by(file_config, "source_path_modifier",
'source path modifier', locale=locale)
kwargs['locale'] = locale
paths.append(os.path.join(
base_artifact_prefix,
jsone.render(file_config['source_path_modifier'], kwargs),
jsone.render(filename, kwargs),
jsone.render(file_config['source_path_modifier'], {'locale': locale}),
filename,
))
if (
job.get('dependencies') and
getattr(job['dependencies'][dep], 'release_artifacts', None)
):
if getattr(job['dependencies'][dep], 'release_artifacts', None):
paths = [
path for path in paths
if path in job['dependencies'][dep].release_artifacts
]
if path in job['dependencies'][dep].release_artifacts]
if not paths:
continue
@ -505,6 +491,57 @@ def generate_beetmover_upstream_artifacts(
return upstream_artifacts
# generate_beetmover_compressed_upstream_artifacts {{{1
def generate_beetmover_compressed_upstream_artifacts(job, dependencies=None):
"""Generate compressed file upstream artifacts for beetmover.
These artifacts will not be beetmoved directly, but will be
decompressed from upstream_mapping and the contents beetmoved
using the `mapping` entry in the artifact map.
Currently only applies to beetmover tasks.
Args:
job (dict): The current job being generated
dependencies (list): A list of the job's dependency labels.
Returns:
list: A list of dictionaries conforming to the upstream_artifacts spec.
"""
base_artifact_prefix = get_artifact_prefix(job)
map_config = deepcopy(cached_load_yaml(job['attributes']['artifact_map']))
upstream_artifacts = list()
if not dependencies:
dependencies = job['dependencies'].keys()
for dep in dependencies:
paths = list()
for filename in map_config['upstream_mapping']:
if dep not in map_config['upstream_mapping'][filename]['from']:
continue
paths.append(os.path.join(
base_artifact_prefix,
filename,
))
if not paths:
continue
upstream_artifacts.append({
"taskId": {
"task-reference": "<{}>".format(dep)
},
"taskType": map_config['tasktype_map'].get(dep),
"paths": sorted(paths),
"zipExtract": True,
})
return upstream_artifacts
# generate_beetmover_artifact_map {{{1
def generate_beetmover_artifact_map(config, job, **kwargs):
"""Generate the beetmover artifact map.

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

@ -7,7 +7,6 @@ Defines artifacts to sign before repackage.
from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.util.taskcluster import get_artifact_path
from taskgraph.util.declarative_artifacts import get_geckoview_upstream_artifacts
def is_partner_kind(kind):
@ -16,26 +15,23 @@ def is_partner_kind(kind):
def generate_specifications_of_artifacts_to_sign(
config, job, keep_locale_template=True, kind=None
task, keep_locale_template=True, kind=None
):
build_platform = job['attributes'].get('build_platform')
use_stub = job['attributes'].get('stub-installer')
build_platform = task.attributes.get('build_platform')
use_stub = task.attributes.get('stub-installer')
if kind == 'release-source-signing':
artifacts_specifications = [{
'artifacts': [
get_artifact_path(job, 'source.tar.xz')
get_artifact_path(task, 'source.tar.xz')
],
'formats': ['autograph_gpg'],
}]
elif 'android' in build_platform:
artifacts_specifications = [{
'artifacts': [
get_artifact_path(job, '{locale}/target.apk'),
get_artifact_path(task, '{locale}/target.apk'),
],
'formats': ['autograph_apk_fennec_sha1'],
}, {
'artifacts': get_geckoview_artifacts_to_sign(config, job),
'formats': ['autograph_gpg'],
}]
# XXX: Mars aren't signed here (on any platform) because internals will be
# signed at after this stage of the release
@ -45,29 +41,29 @@ def generate_specifications_of_artifacts_to_sign(
else:
extension = 'dmg'
artifacts_specifications = [{
'artifacts': [get_artifact_path(job, '{{locale}}/target.{}'.format(extension))],
'artifacts': [get_artifact_path(task, '{{locale}}/target.{}'.format(extension))],
'formats': ['macapp', 'autograph_widevine', 'autograph_omnija'],
}]
elif 'win' in build_platform:
artifacts_specifications = [{
'artifacts': [
get_artifact_path(job, '{locale}/setup.exe'),
get_artifact_path(task, '{locale}/setup.exe'),
],
'formats': ['sha2signcode'],
}, {
'artifacts': [
get_artifact_path(job, '{locale}/target.zip'),
get_artifact_path(task, '{locale}/target.zip'),
],
'formats': ['sha2signcode', 'autograph_widevine', 'autograph_omnija'],
}]
if use_stub:
artifacts_specifications[0]['artifacts'] += [
get_artifact_path(job, '{locale}/setup-stub.exe')
get_artifact_path(task, '{locale}/setup-stub.exe')
]
elif 'linux' in build_platform:
artifacts_specifications = [{
'artifacts': [get_artifact_path(job, '{locale}/target.tar.bz2')],
'artifacts': [get_artifact_path(task, '{locale}/target.tar.bz2')],
'formats': ['autograph_gpg', 'autograph_widevine', 'autograph_omnija'],
}]
else:
@ -121,13 +117,3 @@ def get_signed_artifacts(input, formats, behavior=None):
artifacts.add('{}.asc'.format(input))
return artifacts
def get_geckoview_artifacts_to_sign(config, job):
upstream_artifacts = get_geckoview_upstream_artifacts(config, job)
return [
path
for upstream_artifact in upstream_artifacts
for path in upstream_artifact['paths']
if not path.endswith('.md5') and not path.endswith('.sha1')
]