diff --git a/.cron.yml b/.cron.yml index fdc0e07ac..245e792eb 100644 --- a/.cron.yml +++ b/.cron.yml @@ -12,6 +12,12 @@ jobs: when: - {hour: 6, minute: 0} - {hour: 18, minute: 0} + - name: fennec-nightly + job: + type: decision-task + treeherder-symbol: N-fennec + target-tasks-method: fennec-nightly + when: [] # Force hook only - name: raptor job: type: decision-task diff --git a/taskcluster/ci/push-apk/kind.yml b/taskcluster/ci/push-apk/kind.yml index d46d73cdd..36e7451ba 100644 --- a/taskcluster/ci/push-apk/kind.yml +++ b/taskcluster/ci/push-apk/kind.yml @@ -17,6 +17,7 @@ primary-dependency: signing group-by: build-type only-for-build-types: + - fennec-nightly - nightly - beta - production @@ -25,9 +26,13 @@ job-template: description: Publish Fenix worker-type: push-apk worker: - commit: true + commit: + by-build-type: + fennec-nightly: false + default: true channel: by-build-type: + fennec-nightly: fennec-nightly nightly: nightly beta: beta production: production diff --git a/taskcluster/fenix_taskgraph/target_tasks.py b/taskcluster/fenix_taskgraph/target_tasks.py index 77f4a574b..68c02963d 100644 --- a/taskcluster/fenix_taskgraph/target_tasks.py +++ b/taskcluster/fenix_taskgraph/target_tasks.py @@ -30,10 +30,22 @@ def target_tasks_nightly(full_task_graph, parameters, graph_config): """Select the set of tasks required for a nightly build.""" def filter(task, parameters): - return task.attributes.get("nightly", False) + return ( + task.attributes.get("nightly", False) and + 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" + +@_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)] + @_target_task('raptor') def target_tasks_raptor(full_task_graph, parameters, graph_config): diff --git a/taskcluster/fenix_taskgraph/transforms/push_apk.py b/taskcluster/fenix_taskgraph/transforms/push_apk.py index 260bc55c3..0d893d5ce 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, @@ -41,6 +41,9 @@ def build_worker_definition(config, tasks): # Fenix production doesn't follow the rule {product}-{channel} if task["attributes"]["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" task["worker"].update(worker_definition) yield task