-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Description
Problem
Manifest lists are currently created and pushed during the Publish stage by the publishManifest command. This causes several problems:
- Manifest lists cannot be signed. The Sign stage runs before Publish, so manifest list digests don't exist yet at signing time. See Manifest lists are not signed #2001.
- The Publish stage creates new digests. Ideally, the Publish stage should only copy and publish artifacts that were already built and verified - not create new ones.
- Signing manifest lists would require the Publish stage to sign. If we tried to sign manifest lists without moving their creation earlier, we'd need signing infrastructure in the Publish stage, adding complexity and deviating from the clean separation of concerns between stages.
Current Pipeline Flow
- Build - creates platform images, produces per-job image-info fragments
- Post_Build - merges image-info fragments into a single file
- Sign - signs all digests in image-info (platform images only, no manifest lists yet)
- Test - tests images
- Publish - copies images, creates manifest lists, pushes manifests, records manifest digests
Proposed Change
Move manifest list creation from the Publish stage to the Post_Build stage:
- Build - creates platform images, produces per-job image-info fragments
- Post_Build - merges image-info, creates manifest lists, records manifest digests in image-info
- Sign - signs all digests in image-info (platform images AND manifest lists)
- Test - tests images
- Publish - copies images, pushes already-created manifest lists (no new digests created)
Benefits
- Enables manifest list signing - manifest list digests are present in
image-info.jsonbefore the Sign stage - Cleaner Publish stage - Publish only copies and pushes existing artifacts, no new content is created
- Simpler signing model - all signing happens in one place (the Sign stage), no need for signing infrastructure in Publish
Considerations
- The
publishManifestcommand currently both creates manifest lists and pushes them to the registry. These two operations will need to be separated - creation in Post_Build, pushing in Publish. - Manifest lists created in Post_Build will reference platform images in the build registry. During Publish, after images are copied to the publish registry, manifest lists may need to be re-tagged or re-associated with the publish registry.
- The
SaveTagInfoToImageInfoFileAsynclogic inPublishManifestCommand(which records manifest digests back toimage-info.json) will need to move or be refactored to run at the appropriate stage.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog