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

TaskRuns can't be stored in OCI registries #190

Closed
Tracked by #205
priyawadhwa opened this issue Aug 12, 2021 · 8 comments
Closed
Tracked by #205

TaskRuns can't be stored in OCI registries #190

priyawadhwa opened this issue Aug 12, 2021 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@priyawadhwa
Copy link
Contributor

we get this error:

{"level":"info","ts":"2021-08-12T15:12:00.776Z","logger":"watcher.event-broadcaster","caller":"record/event.go:282","msg":"Event(v1.ObjectReference{Kind:\"TaskRun\", Namespace:\"default\", Name:\"build-push-run-output-image-l4mjf\", UID:\"8628d8a4-2ca6-401f-a15a-c310d2cbd562\", APIVersion:\"tekton.dev/v1beta1\", ResourceVersion:\"91241155\", FieldPath:\"\"}): type: 'Warning' reason: 'InternalError' 1 error occurred:\n\t* getting digest: digest must be between 71 and 71 runes in length: \n\n"}
@priyawadhwa priyawadhwa added the kind/bug Categorizes issue or PR as related to a bug. label Aug 12, 2021
@priyawadhwa
Copy link
Contributor Author

so looks like we only support OCI storage backend for OCI images right now

https://github.com/tektoncd/chains/blob/main/pkg/chains/storage/oci/oci.go#L72

we could add support for storing TaskRuns and signatures in OCI

  1. name the image [repo]-[taskrun name-uid]
  2. upload the TaskRun (with the annotations containing signature/) to OCI via cosign upload-blob library
  3. also upload the signature to OCI registry as cosign would

@priyawadhwa
Copy link
Contributor Author

waiting on sigstore/cosign#535 to merge so that we can use cosign to upload files to an OCI registry

@priyawadhwa
Copy link
Contributor Author

The PR was merged & I tried updating but ran into some dependency conflicts -- chains depends on knative which requires k8s.io/api at v0.20.7, while cosign @ main requires v0.22.0

@priyawadhwa priyawadhwa mentioned this issue Aug 23, 2021
10 tasks
@priyawadhwa
Copy link
Contributor Author

once #203 is closed we should be able to do this as well

@nadgowdas
Copy link

thanks @priyawadhwa

@priyawadhwa
Copy link
Contributor Author

This is (sort of) fixed -- we can store in-toto attestations in OCI registries but we still can't store any generic thing in a registry (e.g. a TaskRun yaml as is)

@nadgowdas were you trying to store the TaskRun yaml as is?

@nadgowdas
Copy link

@priyawadhwa I was trying to save the signed taskrun spec in OCI registry. Basically using artifacts.taskrun.storage config with oci. And I was using tekton-provenance format, which stores it in JSON format

@priyawadhwa
Copy link
Contributor Author

sounds good, that should be working now! i'll close this issue then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants