From de759bb336cfe68f05d806ac252544274133bdc4 Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Wed, 19 Feb 2020 15:35:20 +0100 Subject: [PATCH] Bug 1612540 - part 1: Move Fennec Beta to GitHub releases and a to a dedicated hook (#8270) --- taskcluster/ci/build/kind.yml | 7 ++----- taskcluster/ci/push-apk/kind.yml | 7 ++++++- taskcluster/fenix_taskgraph/target_tasks.py | 17 +++++++++++++---- .../fenix_taskgraph/transforms/push_apk.py | 13 ++++++++----- version.txt | 2 +- 5 files changed, 30 insertions(+), 16 deletions(-) diff --git a/taskcluster/ci/build/kind.yml b/taskcluster/ci/build/kind.yml index c8c28f27c..bb41c2701 100644 --- a/taskcluster/ci/build/kind.yml +++ b/taskcluster/ci/build/kind.yml @@ -134,13 +134,10 @@ jobs: fennec-beta: attributes: - # TODO replace `nightly: true` by `release-type: beta` once the data migration - # testing is over - # TODO when making the above change, uncomment `filter-incomplete-translations: true` - nightly: true + release-type: beta include-release-version: true include-shippable-secrets: true -# filter-incomplete-translations: true + filter-incomplete-translations: true run: geckoview-engine: geckoBeta gradle-build-type: fennecBeta diff --git a/taskcluster/ci/push-apk/kind.yml b/taskcluster/ci/push-apk/kind.yml index a4727f282..232f1facf 100644 --- a/taskcluster/ci/push-apk/kind.yml +++ b/taskcluster/ci/push-apk/kind.yml @@ -18,6 +18,7 @@ group-by: build-type only-for-build-types: - fennec-nightly + - fennec-beta - nightly - beta - production @@ -26,10 +27,14 @@ job-template: description: Publish Fenix worker-type: push-apk worker: - commit: true + commit: + by-build-type: + fennec-beta: false + default: true channel: by-build-type: fennec-nightly: fennec-nightly + fennec-beta: fennec-beta nightly: nightly beta: beta production: production diff --git a/taskcluster/fenix_taskgraph/target_tasks.py b/taskcluster/fenix_taskgraph/target_tasks.py index 68c02963d..efa0ec1e3 100644 --- a/taskcluster/fenix_taskgraph/target_tasks.py +++ b/taskcluster/fenix_taskgraph/target_tasks.py @@ -32,19 +32,28 @@ def target_tasks_nightly(full_task_graph, parameters, graph_config): def filter(task, parameters): return ( task.attributes.get("nightly", False) and - not _filter_fennec_nightly(task, parameters) + not _filter_fennec("nightly", task, parameters) ) return [l for l, t in full_task_graph.tasks.iteritems() if filter(t, parameters)] -def _filter_fennec_nightly(task, parameters): - return task.attributes.get("build-type", "") == "fennec-nightly" + +def _filter_fennec(fennec_type, task, parameters): + return task.attributes.get("build-type", "") == "fennec-{}".format(fennec_type) + @_target_task("fennec-nightly") def target_tasks_fennec_nightly(full_task_graph, parameters, graph_config): """Select the set of tasks required for a nightly build signed with the fennec key.""" - return [l for l, t in full_task_graph.tasks.iteritems() if _filter_fennec_nightly(t, parameters)] + return [l for l, t in full_task_graph.tasks.iteritems() if _filter_fennec("nightly", t, parameters)] + + +@_target_task("fennec-beta") +def target_tasks_fennec_nightly(full_task_graph, parameters, graph_config): + """Select the set of tasks required for a beta build signed with the fennec key.""" + + return [l for l, t in full_task_graph.tasks.iteritems() if _filter_fennec("beta", t, parameters)] @_target_task('raptor') diff --git a/taskcluster/fenix_taskgraph/transforms/push_apk.py b/taskcluster/fenix_taskgraph/transforms/push_apk.py index 2ba8633b3..4f087a7a4 100644 --- a/taskcluster/fenix_taskgraph/transforms/push_apk.py +++ b/taskcluster/fenix_taskgraph/transforms/push_apk.py @@ -18,7 +18,7 @@ transforms = TransformSequence() @transforms.add def resolve_keys(config, tasks): for task in tasks: - for key in ("worker.channel", "worker.dep"): + for key in ("worker.channel", "worker.commit", "worker.dep"): resolve_keyed_by( task, key, @@ -38,12 +38,15 @@ def build_worker_definition(config, tasks): worker_definition["certificate-alias"] = "{}-{}".format( task["worker"]["product"], task["worker"]["channel"] ) + + build_type = task["attributes"]["build-type"] # Fenix production doesn't follow the rule {product}-{channel} - if task["attributes"]["build-type"] == "production": + if build_type == "production": worker_definition["certificate-alias"] = "fenix" - # Neither does Fennec nightly - elif task["attributes"]["build-type"] == "fennec-nightly": - worker_definition["certificate-alias"] = "fennec-nightly" + # Neither do Fennec flavored builds + elif build_type.startswith("fennec-"): + worker_definition["certificate-alias"] = build_type task["worker"].update(worker_definition) + yield task diff --git a/version.txt b/version.txt index 4ea2ad07e..2f9037bc3 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.1.0-beta.1 +4.0.0-beta.2