|
|
@ -12,6 +12,12 @@ from taskgraph.transforms.task import index_builder
|
|
|
|
# In the future, notifying consumers may be easier (https://bugzilla.mozilla.org/show_bug.cgi?id=1548810), but
|
|
|
|
# In the future, notifying consumers may be easier (https://bugzilla.mozilla.org/show_bug.cgi?id=1548810), but
|
|
|
|
# we need to remember to tell users for the time being
|
|
|
|
# we need to remember to tell users for the time being
|
|
|
|
SIGNING_ROUTE_TEMPLATES = [
|
|
|
|
SIGNING_ROUTE_TEMPLATES = [
|
|
|
|
|
|
|
|
"index.{trust-domain}.v2.{project}.{variant}.latest.{abi}",
|
|
|
|
|
|
|
|
"index.{trust-domain}.v2.{project}.{variant}.{build_date}.revision.{head_rev}.{abi}",
|
|
|
|
|
|
|
|
"index.{trust-domain}.v2.{project}.{variant}.{build_date}.latest.{abi}",
|
|
|
|
|
|
|
|
"index.{trust-domain}.v2.{project}.{variant}.revision.{head_rev}.{abi}",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO Bug 1631839: Remove the following scopes once all consumers have migrated
|
|
|
|
"index.project.{trust-domain}.{project}.v2.{variant}.{build_date}.revision.{head_rev}",
|
|
|
|
"index.project.{trust-domain}.{project}.v2.{variant}.{build_date}.revision.{head_rev}",
|
|
|
|
"index.project.{trust-domain}.{project}.v2.{variant}.{build_date}.latest",
|
|
|
|
"index.project.{trust-domain}.{project}.v2.{variant}.{build_date}.latest",
|
|
|
|
"index.project.{trust-domain}.{project}.v2.{variant}.latest",
|
|
|
|
"index.project.{trust-domain}.{project}.v2.{variant}.latest",
|
|
|
@ -20,8 +26,6 @@ SIGNING_ROUTE_TEMPLATES = [
|
|
|
|
|
|
|
|
|
|
|
|
@index_builder("signing")
|
|
|
|
@index_builder("signing")
|
|
|
|
def add_signing_indexes(config, task):
|
|
|
|
def add_signing_indexes(config, task):
|
|
|
|
routes = task.setdefault("routes", [])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if config.params["level"] != "3":
|
|
|
|
if config.params["level"] != "3":
|
|
|
|
return task
|
|
|
|
return task
|
|
|
|
|
|
|
|
|
|
|
@ -32,6 +36,11 @@ def add_signing_indexes(config, task):
|
|
|
|
subs["trust-domain"] = config.graph_config["trust-domain"]
|
|
|
|
subs["trust-domain"] = config.graph_config["trust-domain"]
|
|
|
|
subs["variant"] = task["attributes"]["build-type"]
|
|
|
|
subs["variant"] = task["attributes"]["build-type"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unique_routes = set()
|
|
|
|
for tpl in SIGNING_ROUTE_TEMPLATES:
|
|
|
|
for tpl in SIGNING_ROUTE_TEMPLATES:
|
|
|
|
routes.append(tpl.format(**subs))
|
|
|
|
for abi in task["attributes"]["apks"].keys():
|
|
|
|
|
|
|
|
subs["abi"] = abi
|
|
|
|
|
|
|
|
unique_routes.add(tpl.format(**subs))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
task.setdefault("routes", sorted(list(unique_routes)))
|
|
|
|
return task
|
|
|
|
return task
|
|
|
|