Skip to content

Commit 8d61be6

Browse files
authored
fix(release): sort candidate binary inventory (#530)
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
1 parent d42ef6d commit 8d61be6

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

‎.github/workflows/release-candidate.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,8 @@ jobs:
739739
"registry-notary-cel-worker-${{ needs.validate.outputs.tag }}-linux-amd64" \
740740
"registry-relay-${{ needs.validate.outputs.tag }}-linux-amd64" \
741741
"registry-relay-rhai-worker-${{ needs.validate.outputs.tag }}-linux-amd64" \
742-
"registryctl-${{ needs.validate.outputs.tag }}-linux-amd64"
742+
"registryctl-${{ needs.validate.outputs.tag }}-linux-amd64" \
743+
| sort
743744
)"
744745
for build in a b; do
745746
actual="$(find "inputs/build-${build}/dist/bin" -maxdepth 1 -type f -printf '%f\n' | sort)"

‎release/scripts/test_registry_release.py‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,28 @@ def test_candidate_workflow_explicitly_binds_dispatch_action(self) -> None:
329329
self.assertIn('"${REQUEST_EVENT_ACTION}" != "release_candidate"', workflow)
330330
self.assertNotIn("GITHUB_EVENT_ACTION", workflow)
331331

332+
def test_candidate_binary_inventory_compares_sorted_lists(self) -> None:
333+
workflow = (ROOT / ".github/workflows/release-candidate.yml").read_text(
334+
encoding="utf-8"
335+
)
336+
compare_step = workflow[
337+
workflow.index(" - name: Compare canonical binaries") :
338+
workflow.index(
339+
" - name: Install pinned candidate inspection tools"
340+
)
341+
]
342+
expected_block = compare_step[
343+
compare_step.index('expected="$(') :
344+
compare_step.index(' )"', compare_step.index('expected="$('))
345+
]
346+
347+
self.assertIn("| sort", expected_block)
348+
self.assertIn(
349+
'actual="$(find "inputs/build-${build}/dist/bin" '
350+
"-maxdepth 1 -type f -printf '%f\\n' | sort)\"",
351+
compare_step,
352+
)
353+
332354
def test_release_images_publish_and_executably_verify_oci_labels(self) -> None:
333355
workflow = (ROOT / ".github/workflows/release-candidate.yml").read_text(
334356
encoding="utf-8"

0 commit comments

Comments
 (0)