From ca11c16291e7424bbece9bcecbb5d3cf5ff3098d Mon Sep 17 00:00:00 2001 From: David Crossley Date: Mon, 10 Aug 2026 10:12:04 +1000 Subject: [PATCH 1/3] Add schedule-matchkeys id property DEVOPS-8235 --- .github/workflows/schedule-deployment.yml | 1 + .github/workflows/scripts/schedule_matchkeys.py | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/schedule-deployment.yml b/.github/workflows/schedule-deployment.yml index 93f88f6..f78d1ef 100644 --- a/.github/workflows/schedule-deployment.yml +++ b/.github/workflows/schedule-deployment.yml @@ -75,6 +75,7 @@ jobs: - name: Append JSONL to file env: SCHEDULE: ${{ steps.verify-inputs.outputs.schedule }} + JOB_ID: ${{ github.run_number }} run: python3 .github/workflows/scripts/schedule_matchkeys.py -l info - name: Show recent schedule diff --git a/.github/workflows/scripts/schedule_matchkeys.py b/.github/workflows/scripts/schedule_matchkeys.py index 946a5ba..9e793a4 100755 --- a/.github/workflows/scripts/schedule_matchkeys.py +++ b/.github/workflows/scripts/schedule_matchkeys.py @@ -14,7 +14,7 @@ from pathlib import Path import sys -SCRIPT_VERSION = "1.0.1" +SCRIPT_VERSION = "1.0.2" LOGLEVELS = { "debug": logging.DEBUG, @@ -54,17 +54,23 @@ def get_options(): except KeyError: LOGGER.error("Missing env: SCHEDULE") options_okay = False + try: + job_id = os.environ["JOB_ID"] + except KeyError: + LOGGER.error("Missing env: JOB_ID") + options_okay = False schedule_pn = PROG_PATH.parent.parent.parent.joinpath("js/schedule-matchkeys.jsonl") if not options_okay: sys.exit(2) - return schedule, schedule_pn + return int(job_id), schedule, schedule_pn -def append_schedule(schedule, schedule_pn): +def append_schedule(job_id, schedule, schedule_pn): """ Composes the JSONL and appends to file. """ json_packet = {} + json_packet["id"] = job_id json_packet["scheduleDate"] = ( datetime.now(timezone.utc).replace(microsecond=0).isoformat() ) @@ -78,9 +84,9 @@ def main(): """ Append the schedule JSONL to schedule-matchkeys.jsonl file. """ - schedule, schedule_pn = get_options() + job_id, schedule, schedule_pn = get_options() LOGGER.debug("schedule=%s schedule_pn=%s", schedule, schedule_pn) - append_schedule(schedule, schedule_pn) + append_schedule(job_id, schedule, schedule_pn) if __name__ == "__main__": From 8abb6f674a07e67a762bee1701f2635eb28891c2 Mon Sep 17 00:00:00 2001 From: dcrossleyau <8520792+dcrossleyau@users.noreply.github.com> Date: Mon, 10 Aug 2026 00:19:08 +0000 Subject: [PATCH 2/3] Apply schedule matchkeys --- js/schedule-matchkeys.jsonl | 1 + 1 file changed, 1 insertion(+) diff --git a/js/schedule-matchkeys.jsonl b/js/schedule-matchkeys.jsonl index 9e5c2f6..f55aa74 100644 --- a/js/schedule-matchkeys.jsonl +++ b/js/schedule-matchkeys.jsonl @@ -1,2 +1,3 @@ {"scheduleDate": "2026-07-28T07:33:40+00:00", "deployment": "goldrush2024:1163910:main,isxn:d88522c:main"} {"scheduleDate": "2026-07-28T07:36:44+00:00", "deployment": "goldrush2024:5d8c6eb:main"} +{"id": 16, "scheduleDate": "2026-08-10T00:19:07+00:00", "deployment": "goldrush2024:1163910:remotes/origin/main,isxn:d88522c:remotes/origin/main"} From 94ef143781ebcec386edb1b751c1171204f4b0f6 Mon Sep 17 00:00:00 2001 From: David Crossley Date: Mon, 10 Aug 2026 10:28:16 +1000 Subject: [PATCH 3/3] Delete test records schedule-matchkeys DEVOPS-8235 --- js/schedule-matchkeys.jsonl | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/schedule-matchkeys.jsonl b/js/schedule-matchkeys.jsonl index f55aa74..ca3c752 100644 --- a/js/schedule-matchkeys.jsonl +++ b/js/schedule-matchkeys.jsonl @@ -1,3 +1 @@ -{"scheduleDate": "2026-07-28T07:33:40+00:00", "deployment": "goldrush2024:1163910:main,isxn:d88522c:main"} -{"scheduleDate": "2026-07-28T07:36:44+00:00", "deployment": "goldrush2024:5d8c6eb:main"} {"id": 16, "scheduleDate": "2026-08-10T00:19:07+00:00", "deployment": "goldrush2024:1163910:remotes/origin/main,isxn:d88522c:remotes/origin/main"}