Bug 1442545: [partner-repack] Add repack partner builds; r=Callek

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

--HG--
extra : rebase_source : cc2a3419115cd40f5cd3f997071b0e1b46324821
extra : histedit_source : 24f8156d534da14a89a149c86eeecb57eb74ec23
This commit is contained in:
Tom Prince 2018-04-18 11:02:02 -06:00
Родитель f6aa7204c0
Коммит c4549c8e6b
9 изменённых файлов: 219 добавлений и 114 удалений

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

@ -0,0 +1,81 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
loader: taskgraph.loader.transform:loader
transforms:
- taskgraph.transforms.release_deps:transforms
- taskgraph.transforms.partner_repack:transforms
- taskgraph.transforms.release_notifications:transforms
- taskgraph.transforms.job:transforms
- taskgraph.transforms.task:transforms
kind-dependencies:
- build-signing
- nightly-l10n-signing
job-defaults:
name: eme-free-repack
description: Release Promotion eme-free repacks
run-on-projects: [] # to make sure this never runs as part of CI
shipping-product: firefox
shipping-phase: promote
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image:
in-tree: "partner-repack"
chain-of-trust: true
max-run-time: 7200
env:
REPACK_MANIFESTS_URL:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
mozilla-release: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
maple: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
using: mozharness
config:
- partner_repacks/release_mozilla-release_desktop.py
script: mozharness/scripts/desktop_partner_repacks.py
job-script: taskcluster/scripts/builder/repackage.sh
need-xvfb: false
tooltool-downloads: false
jobs:
macosx64-nightly:
treeherder:
symbol: EME
platform: macosx64/opt
kind: test
tier: 1
attributes:
build_platform: macosx64-nightly
build_type: opt
artifact_prefix: releng/partner
nightly: true
win32-nightly:
treeherder:
symbol: EME
platform: win32/opt
kind: test
tier: 1
attributes:
build_platform: win32-nightly
build_type: opt
artifact_prefix: releng/partner
nightly: true
win64-nightly:
treeherder:
symbol: EME
platform: win64/opt
kind: test
tier: 1
attributes:
build_platform: win64-nightly
build_type: opt
artifact_prefix: releng/partner
nightly: true

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

@ -7,133 +7,74 @@ loader: taskgraph.loader.transform:loader
transforms:
- taskgraph.transforms.release_deps:transforms
- taskgraph.transforms.partner_repack:transforms
- taskgraph.transforms.job:transforms
- taskgraph.transforms.release_notifications:transforms
- taskgraph.transforms.job:transforms
- taskgraph.transforms.task:transforms
kind-dependencies:
- post-beetmover-dummy
- build-signing
- nightly-l10n-signing
job-defaults:
name: partner-repack
description: Release Promotion partner repacks
worker-type: buildbot-bridge/buildbot-bridge
run-on-projects: []
run-on-projects: [] # to make sure this never runs as part of CI
shipping-product: firefox
shipping-phase: promote
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
docker-image:
in-tree: "partner-repack"
chain-of-trust: true
max-run-time: 7200
env:
REPACK_MANIFESTS_URL:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/repack-manifests.git"
mozilla-release: "git@github.com:mozilla-partners/repack-manifests.git"
maple: "git@github.com:mozilla-partners/repack-manifests.git"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
using: buildbot
release-promotion: true
product: firefox
using: mozharness
config:
- partner_repacks/release_mozilla-release_desktop.py
script: mozharness/scripts/desktop_partner_repacks.py
job-script: taskcluster/scripts/builder/repackage.sh
need-xvfb: false
tooltool-downloads: false
jobs:
firefox-linux:
label: firefox linux partner repacks
linux-nightly:
attributes:
build_platform: linux-nightly
worker:
properties:
repack_manifests_url:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/repack-manifests.git"
mozilla-release: "git@github.com:mozilla-partners/repack-manifests.git"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
buildername: release-{branch}-firefox-linux_partner_repacks
build_type: opt
artifact_prefix: releng/partner
nightly: true
firefox-linux64:
label: firefox linux64 partner repacks
linux64-nightly:
attributes:
build_platform: linux64-nightly
worker:
properties:
repack_manifests_url:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/repack-manifests.git"
mozilla-release: "git@github.com:mozilla-partners/repack-manifests.git"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
buildername: release-{branch}-firefox-linux64_partner_repacks
build_type: opt
artifact_prefix: releng/partner
nightly: true
firefox-macosx:
label: firefox macosx64 partner repacks
macosx64-nightly:
attributes:
build_platform: macosx64-nightly
worker:
properties:
repack_manifests_url:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/repack-manifests.git"
mozilla-release: "git@github.com:mozilla-partners/repack-manifests.git"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
buildername: release-{branch}-firefox-macosx64_partner_repacks
build_type: opt
artifact_prefix: releng/partner
nightly: true
firefox-win32:
label: firefox win32 partner repacks
win32-nightly:
attributes:
build_platform: win32-nightly
worker:
properties:
repack_manifests_url:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/repack-manifests.git"
mozilla-release: "git@github.com:mozilla-partners/repack-manifests.git"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
buildername: release-{branch}-firefox-win32_partner_repacks
build_type: opt
artifact_prefix: releng/partner
nightly: true
firefox-win64:
label: firefox win64 partner repacks
win64-nightly:
attributes:
build_platform: win64-nightly
worker:
properties:
repack_manifests_url:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/repack-manifests.git"
mozilla-release: "git@github.com:mozilla-partners/repack-manifests.git"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
buildername: release-{branch}-firefox-win64_partner_repacks
firefox-macosx-eme-free:
label: firefox macosx64 EME-free repacks
attributes:
build_platform: macosx64-nightly
worker:
properties:
repack_manifests_url:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
mozilla-release: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
buildername: release-{branch}-firefox-macosx64_partner_repacks
firefox-win32-eme-free:
label: firefox win32 EME-free repacks
attributes:
build_platform: win32-nightly
worker:
properties:
repack_manifests_url:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
mozilla-release: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
buildername: release-{branch}-firefox-win32_partner_repacks
firefox-win64-eme-free:
label: firefox win64 EME-free repacks
attributes:
build_platform: win64-nightly
worker:
properties:
repack_manifests_url:
by-project:
mozilla-beta: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
mozilla-release: "git@github.com:mozilla-partners/mozilla-EME-free-manifest"
default: "git@github.com:mozilla-releng/staging-repack-manifests.git"
run:
buildername: release-{branch}-firefox-win64_partner_repacks
build_type: opt
artifact_prefix: releng/partner
nightly: true

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

@ -354,6 +354,10 @@ release-partner-repack
----------------------
Generates customized versions of releases for partners.
release-eme-free-repack
----------------------
Generates customized versions of releases for eme-free repacks.
repackage
---------
Repackage tasks take a signed output and package them up into something suitable

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

@ -8,7 +8,7 @@ from taskgraph.loader.single_dep import loader as base_loader
# XXX: This logic should rely in kind.yml. This hasn't been done in the original
# patch because it required some heavy changes in single_dep.
LABELS_WHICH_SHOULD_SIGN_CI_BUILDS = (
NON_NIGHTLY_LABELS_WHICH_SHOULD_SIGN_BUILDS = (
'build-win32/debug', 'build-win32/opt', 'build-win32/pgo',
'build-win64/debug', 'build-win64/opt', 'build-win64/pgo',
'build-win32-devedition/opt', 'build-win64-devedition/opt',
@ -16,6 +16,8 @@ LABELS_WHICH_SHOULD_SIGN_CI_BUILDS = (
'release-source-linux64-source/opt',
'release-source-linux64-fennec-source/opt',
'release-source-linux64-devedition-source/opt',
'release-eme-free-repack-macosx64-nightly',
'release-partner-repack-macosx64-nightly',
)
@ -25,5 +27,5 @@ def loader(kind, path, config, params, loaded_tasks):
for job in jobs:
dependent_task = job['dependent-task']
if dependent_task.attributes.get('nightly') or \
dependent_task.label in LABELS_WHICH_SHOULD_SIGN_CI_BUILDS:
dependent_task.label in NON_NIGHTLY_LABELS_WHICH_SHOULD_SIGN_BUILDS:
yield job

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

@ -51,10 +51,10 @@ def docker_worker_add_artifacts(config, job, taskdesc):
def generic_worker_add_artifacts(config, job, taskdesc):
""" Adds an artifact directory to the task """
# This ``public/build`` is the location on disk; it doesn't necessarily
# mean the artifacts will be public; that is set via the ``artifact_prefix``
# attribute.
add_artifacts(config, job, taskdesc, path=r'public/build')
# The path is the location on disk; it doesn't necessarily
# mean the artifacts will be public or private; that is set via the name
# attribute in add_artifacts.
add_artifacts(config, job, taskdesc, path=get_artifact_prefix(taskdesc))
def docker_worker_add_gecko_vcs_env_vars(config, job, taskdesc):

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

@ -26,6 +26,12 @@ def make_label(config, jobs):
template = "{kind}-{locale}-{build_platform}/{build_type}"
elif attr('l10n_chunk'):
template = "{kind}-{build_platform}-{l10n_chunk}/{build_type}"
elif config.kind.startswith("release-eme-free") or \
config.kind.startswith("release-partner-repack"):
repack_id = job.get("extra", {}).get("repack_id", None)
template = "{kind}-{build_platform}"
if repack_id:
template += "-{}".format(repack_id.replace('/', '-'))
else:
template = "{kind}-{build_platform}/{build_type}"
job['label'] = template.format(

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

@ -9,15 +9,55 @@ from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import resolve_keyed_by
from taskgraph.util.scriptworker import get_release_config
from taskgraph.util.partners import check_if_partners_enabled
transforms = TransformSequence()
transforms.add(check_if_partners_enabled)
@transforms.add
def resolve_properties(config, tasks):
for task in tasks:
for property in ("repack_manifests_url", ):
property = "worker.properties.{}".format(property)
for property in ("REPACK_MANIFESTS_URL", ):
property = "worker.env.{}".format(property)
resolve_keyed_by(task, property, property, **config.params)
yield task
if task['worker']['env']['REPACK_MANIFESTS_URL'].startswith('git@'):
task.setdefault('scopes', []).append(
'secrets:get:project/releng/gecko/build/level-{level}/partner-github-ssh'.format(
**config.params
)
)
yield task
@transforms.add
def make_label(config, tasks):
for task in tasks:
task['label'] = "{}-{}".format(config.kind, task['name'])
yield task
@transforms.add
def add_command_arguments(config, tasks):
release_config = get_release_config(config)
for task in tasks:
# add the MOZHARNESS_OPTIONS, eg version=61.0, build-number=1, platform=win64
task['run']['options'] = [
'version={}'.format(release_config['version']),
'build-number={}'.format(release_config['build_number']),
'platform={}'.format(task['attributes']['build_platform'].split('-')[0]),
]
# The upstream taskIds are stored a special environment variable, because we want to use
# task-reference's to resolve dependencies, but the string handling of MOZHARNESS_OPTIONS
# blocks that. It's space-separated string of ids in the end.
task['worker']['env']['UPSTREAM_TASKIDS'] = {
'task-reference': ' '.join(['<{}>'.format(dep) for dep in task['dependencies']])
}
yield task

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

@ -376,6 +376,7 @@ task_description_schema = Schema({
# optional features
Required('chain-of-trust'): bool,
Optional('taskcluster-proxy'): bool,
}, {
Required('implementation'): 'buildbot-bridge',
@ -461,6 +462,8 @@ task_description_schema = Schema({
# locale key, if this is a locale beetmover job
Optional('locale'): basestring,
Optional('partner-public'): bool,
Required('release-properties'): {
'app-name': basestring,
'app-version': basestring,
@ -949,6 +952,9 @@ def build_generic_worker_payload(config, task, task_def):
if worker.get('chain-of-trust'):
features['chainOfTrust'] = True
if worker.get('taskcluster-proxy'):
features['taskclusterProxy'] = True
if features:
task_def['payload']['features'] = features
@ -1009,6 +1015,8 @@ def build_beetmover_payload(config, task, task_def):
}
if worker.get('locale'):
task_def['payload']['locale'] = worker['locale']
if worker.get('partner-public'):
task_def['payload']['is_partner_repack_public'] = worker['partner-public']
if release_config:
task_def['payload'].update(release_config)

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

@ -9,6 +9,11 @@ from __future__ import absolute_import, print_function, unicode_literals
from taskgraph.util.taskcluster import get_artifact_path
def is_partner_kind(kind):
if kind and kind.startswith(('release-partner', 'release-eme-free')):
return True
def generate_specifications_of_artifacts_to_sign(
task, keep_locale_template=True, kind=None
):
@ -31,8 +36,12 @@ def generate_specifications_of_artifacts_to_sign(
# XXX: Mars aren't signed here (on any platform) because internals will be
# signed at after this stage of the release
elif 'macosx' in build_platform:
if is_partner_kind(kind):
extension = 'tar.gz'
else:
extension = 'dmg'
artifacts_specifications = [{
'artifacts': [get_artifact_path(task, '{locale}/target.dmg')],
'artifacts': [get_artifact_path(task, '{{locale}}/target.{}'.format(extension))],
'formats': ['macapp', 'widevine'],
}]
elif 'win' in build_platform:
@ -62,6 +71,9 @@ def generate_specifications_of_artifacts_to_sign(
if not keep_locale_template:
artifacts_specifications = _strip_locale_template(artifacts_specifications)
if is_partner_kind(kind):
artifacts_specifications = _strip_widevine_for_partners(artifacts_specifications)
return artifacts_specifications
@ -73,3 +85,14 @@ def _strip_locale_template(artifacts_without_locales):
spec['artifacts'][index] = stripped_artifact
return artifacts_without_locales
def _strip_widevine_for_partners(artifacts_specifications):
""" Partner repacks should not resign that's previously signed for fear of breaking partial
updates
"""
for spec in artifacts_specifications:
if 'widevine' in spec['formats']:
spec['formats'].remove('widevine')
return artifacts_specifications