Verify desktop cards separately from the Container Runner card

This commit is contained in:
Pavel Isaev 2026-11-10 23:58:44 +03:00
parent a975e9842b
commit dd28dcbd3f

View file

@ -342,9 +342,14 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
with urllib.request.urlopen(url + '/v1/releases.json', timeout=60) as response:
releases = json.load(response)['releases']
current = [r for r in releases if r['current']]
if ({r['variant'] for r in current} != set(publish_variants) or len(current) != len(publish_variants)
or any(r['version'] != stamp for r in current)):
# Container Runner has its own current card, which may still point at
# the previous month's ISO on an OSTree or desktop-ISO cycle.
desktop_current = [r for r in current if r.get('variant') != 'container']
if ({r['variant'] for r in desktop_current} != set(publish_variants)
or len(desktop_current) != len(publish_variants)
or any(r['version'] != stamp for r in desktop_current)):
raise ValueError('Published catalog does not match this cycle')
current = desktop_current
for item in current:
address = url.split('/archipelago')[0] + item['url']
with urllib.request.urlopen(urllib.request.Request(address, method='HEAD'), timeout=60) as response:
@ -378,6 +383,13 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
with urllib.request.urlopen(address + '.sha256', timeout=60) as response:
if response.read().decode().split()[0] != container_record['sha256']:
raise ValueError('Container Runner checksum mismatch')
if mode == 'iso':
with urllib.request.urlopen(url + '/v1/releases.json', timeout=60) as response:
catalog = json.load(response)['releases']
cards = [item for item in catalog
if item.get('current') and item.get('variant') == 'container']
if len(cards) != 1 or cards[0]['version'] != stamp:
raise ValueError('Container Runner catalog card does not match this cycle')
state['container'] = container_record
phase('cleaning-worker', releases=current)
# Local terra worker logs must survive removal of the build workspace.