-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a GCS deploy workflow #45
Conversation
Comparison to current implementationSee https://github.com/sigstore/root-signing/blob/main/.github/workflows/sync-main-to-staging.yml The main logical change is that the git repository now only contains the current metadata versions. This means that if the publishing mechanism wants to both delete old metadata and artifacts but also ensure old metadata & artifacts are available for clients to use for a period of time, it needs to manage that. In practice there should be no pressing need for a sigstore repository to delete old metadata & artifacts: there will only be small amount of new files per year in normal operation. The technical changes are listed below:
|
@haydentherapper feel free to have a look already, I think this should be finished (but let's not merge yet). |
Two obvious feature requests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Only gap is figuring out the automation side of things, and probably splitting up deployments to pages and deployments to GCS (pages could always be automatic, GCS automatic just for regular ts/snapshot updates)
This uploads the repository to GCS and invalidates the CDN cache. * the workflow is a custom one for root-signing * it is called as a reusable workflow from the TUF-on-CI publish workflow (so gets automated issue failing on errors) GCP configuration is mostly hard coded, only service accunt details are inputs: * service account: same as online signing * project: projectsigstore-staging * GCS bucket: tuf-root-staging * CDN load balancer: tuf-repo-cdn-lb Signed-off-by: Jussi Kukkonen <[email protected]>
Signed-off-by: Jussi Kukkonen <[email protected]>
rsync features: * exclude list (used for timestamp) * --delete-unmatched-destination-objects may be useful in future to delete unused metadata files Note that gcloud rsync CLI is not the same as unix rsync: the SOURCE and DEST arguments in particular function completely differently. Also put some variables into actual named variables. Signed-off-by: Jussi Kukkonen <[email protected]>
Rebased on main. I'm marking this ready:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Let's sync away.
If I were to write a premortem, maybe there's a permissions issue, but we're using a service account in production that has the same permissions and performs the same steps in GCS and CDN. I double checked the IAM binding is for repo:sigstore/root-signing-staging:ref:refs/heads/main
.
Fixes #7
This uploads the repository to GCS and invalidates the CDN cache.
GCP configuration is mostly hard coded, only service account details are inputs: