Skip to content

Commit a4cf16f

Browse files
committed
Check the existence and version of Sigstore CLI
1 parent 4c00245 commit a4cf16f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

run_release.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,20 @@ def check_ssh_connection(db: ReleaseShelf) -> None:
316316
client.exec_command("pwd")
317317

318318

319+
def check_sigstore_client(db: ReleaseShelf) -> None:
320+
client = paramiko.SSHClient()
321+
client.load_system_host_keys()
322+
client.set_missing_host_key_policy(paramiko.WarningPolicy)
323+
client.connect(DOWNLOADS_SERVER, port=22, username=db["ssh_user"])
324+
_, stdout, _ = client.exec_command("python3 -m sigstore --version")
325+
sigstore_version = stdout.read(1000).decode()
326+
if not sigstore_version.startswith("sigstore 3."):
327+
raise ReleaseException(
328+
f"Sigstore version not detected or not valid. "
329+
f"Expecting 3.x: {sigstore_version}"
330+
)
331+
332+
319333
def check_buildbots(db: ReleaseShelf) -> None:
320334
async def _check() -> set[Builder]:
321335
async def _get_builder_status(
@@ -1250,6 +1264,7 @@ def _api_key(api_key: str) -> str:
12501264
check_ssh_connection,
12511265
f"Validating ssh connection to {DOWNLOADS_SERVER} and {DOCS_SERVER}",
12521266
),
1267+
Task(check_sigstore_client, "Checking Sigstore CLI"),
12531268
Task(check_buildbots, "Check buildbots are good"),
12541269
Task(check_cpython_repo_is_clean, "Checking Git repository is clean"),
12551270
Task(check_magic_number, "Checking the magic number is up-to-date"),

0 commit comments

Comments
 (0)