Browse Source

Bug 1608882 - part 1: Move Fennec Nightly to a dedicated hook

master
Johan Lorenzo 2 years ago
committed by Sebastian Kaspari
parent
commit
76bf74c4be
  1. 6
      .cron.yml
  2. 7
      taskcluster/ci/push-apk/kind.yml
  3. 14
      taskcluster/fenix_taskgraph/target_tasks.py
  4. 5
      taskcluster/fenix_taskgraph/transforms/push_apk.py

6
.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

7
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

14
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):

5
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

Loading…
Cancel
Save