@@ -316,6 +316,23 @@ 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+ sigstore_vermatch = re .match ("^sigstore ([0-9.]+)" , sigstore_version )
327+ if not sigstore_vermatch or tuple (
328+ int (part ) for part in sigstore_vermatch .group (1 ).split ("." )
329+ ) < (3 , 5 ):
330+ raise ReleaseException (
331+ f"Sigstore version not detected or not valid. "
332+ f"Expecting 3.5.x or later: { sigstore_version } "
333+ )
334+
335+
319336def check_buildbots (db : ReleaseShelf ) -> None :
320337 async def _check () -> set [Builder ]:
321338 async def _get_builder_status (
@@ -1250,6 +1267,7 @@ def _api_key(api_key: str) -> str:
12501267 check_ssh_connection ,
12511268 f"Validating ssh connection to { DOWNLOADS_SERVER } and { DOCS_SERVER } " ,
12521269 ),
1270+ Task (check_sigstore_client , "Checking Sigstore CLI" ),
12531271 Task (check_buildbots , "Check buildbots are good" ),
12541272 Task (check_cpython_repo_is_clean , "Checking Git repository is clean" ),
12551273 Task (check_magic_number , "Checking the magic number is up-to-date" ),
0 commit comments