From ed55b8c1e6b6c2acae9b001d4a28319aa72e4cde Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 24 Sep 2018 17:26:53 +0200 Subject: [PATCH] Index daily decision tasks even if they fail --- etc/ci/taskcluster/decision-task.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/etc/ci/taskcluster/decision-task.py b/etc/ci/taskcluster/decision-task.py index 8fa87f4bf73..351990798cf 100644 --- a/etc/ci/taskcluster/decision-task.py +++ b/etc/ci/taskcluster/decision-task.py @@ -26,6 +26,19 @@ def main(): def daily_tasks_setup(): + # ':' is not accepted in an index namepspace: + # https://docs.taskcluster.net/docs/reference/core/taskcluster-index/references/api + now = decision.now.strftime("%Y-%m-%d_%H-%M-%S") + index_path = "%s.daily.%s" % (decision.index_prefix, now) + # Index this task manually rather than with a route, + # so that it is indexed even if it fails. + decision.index_service.insertTask(index_path, { + "taskId": os.environ["TASK_ID"], + "rank": 0, + "data": {}, + "expires": decision.from_now_json(log_artifacts_expiry), + }) + # Unlike when reacting to a GitHub event, # the commit hash is not known until we clone the repository. os.environ["GIT_SHA"] = \