forked from mirrors/gecko-dev
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:
parent
d5ca7f303f
commit
b48728443e
2 changed files with 39 additions and 0 deletions
11
.cron.yml
11
.cron.yml
|
|
@ -388,3 +388,14 @@ jobs:
|
||||||
- mozilla-central
|
- mozilla-central
|
||||||
when:
|
when:
|
||||||
- {hour: 0, minute: 0}
|
- {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():
|
for name, task in full_task_graph.tasks.items():
|
||||||
if "snap-upstream-test" in name and not "-try" in name:
|
if "snap-upstream-test" in name and not "-try" in name:
|
||||||
yield 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)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue