Bug 1876318 - add nightly-android target tasks method and cron job. r=bhearsum,releng-reviewers,taskgraph-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D201391
This commit is contained in:
Julien Cristau 2024-02-02 13:12:59 +01:00
Родитель d5ca7f303f
Коммит b48728443e
2 изменённых файлов: 39 добавлений и 0 удалений

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

@ -388,3 +388,14 @@ jobs:
- mozilla-central
when:
- {hour: 0, minute: 0}
- name: nightly-android
job:
type: decision-task
treeherder-symbol: Na
target-tasks-method: nightly-android
include-push-tasks: true
run-on-projects:
- mozilla-central
- oak
when: [] # hook only

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

@ -1632,3 +1632,31 @@ def target_tasks_snap_upstream_tests(full_task_graph, parameters, graph_config):
for name, task in full_task_graph.tasks.items():
if "snap-upstream-test" in name and not "-try" in name:
yield name
@_target_task("nightly-android")
def target_tasks_nightly_android(full_task_graph, parameters, graph_config):
def filter(task, parameters):
build_type = task.attributes.get("build-type", "")
return build_type in (
"nightly",
"focus-nightly",
"fenix-nightly",
"fenix-nightly-firebase",
"focus-nightly-firebase",
)
index_path = (
f"{graph_config['trust-domain']}.v2.{parameters['project']}.branch."
f"{parameters['head_ref']}.revision.{parameters['head_rev']}.taskgraph.decision-nightly-android"
)
if os.environ.get("MOZ_AUTOMATION") and retry(
index_exists,
args=(index_path,),
kwargs={
"reason": "to avoid triggering multiple nightlies off the same revision",
},
):
return []
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]