Skip to content
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

Refactor the cosign script. #823

Merged
merged 1 commit into from
Sep 12, 2021

Conversation

mattmoor
Copy link
Contributor

This refactors the cosign script for distroless, so that the arguments are passed through from cloudbuild.yaml, and shifts where -key ... is passed to be in cloudbuild.yaml.

This is preparation to start also signing the distroless images with a "keyless" flow, once sigstore/cosign#652 lands and cosign 1.2 cuts.

This refactors the cosign script for distroless, so that the arguments are passed through from `cloudbuild.yaml`, and shifts where `-key ...` is passed to be in `cloudbuild.yaml`.

This is preparation to start *also* signing the distroless images with a "keyless" flow, once sigstore/cosign#652 lands and cosign 1.2 cuts.
@google-cla google-cla bot added the cla: yes CLAs look good label Sep 12, 2021
@mattmoor
Copy link
Contributor Author

Basically what I'm thinking is we'll just add another block in cloudbuild.yaml with:

- name: gcr.io/projectsigstore/cosign:v1.1.0@sha256:47bdf660ceadb5065aa05af62fd24b184db0fdcb34d5892247035dd0dd2d5c3f
  env:
  - PROJECT_ID=${PROJECT_ID}
  - COMMIT_SHA=${COMMIT_SHA}
  - REGISTRY=gcr.io
  - COSIGN_EXPERIMENTAL=true
  - GOOGLE_SERVICE_ACCOUNT_NAME=<THE SA WE WANT THINGS SIGNED WITH>
  entrypoint: sh
  args:
  - -c
  - ./cloudbuild_cosign.sh

@mattmoor
Copy link
Contributor Author

Note to self (or whoever does it!) we should make sure the service account we choose uses ${PROJECT_ID} so that others can replicate builds with gcloud builds submit:

- GOOGLE_SERVICE_ACCOUNT_NAME=<THE SA WE WANT THINGS SIGNED WITH>

@dlorenc dlorenc merged commit cf7b973 into GoogleContainerTools:main Sep 12, 2021
@mattmoor mattmoor deleted the sign-with-fulcio branch September 12, 2021 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLAs look good
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants