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

Add OCI Conformance validation with ORAS #257

Closed
wants to merge 1 commit into from

Conversation

SteveLasker
Copy link
Contributor

Add several steps to validate if a registry supports OCI Artifact types using oras push|pull

Signed-off-by: Steve Lasker [email protected]


## Authenticate with the Registry

Assuming the registry supports basic auth, login:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distribution's auth model is bearer token and not basic. You could call out -

Assuming the registry supports username and password authentication for login.

```bash
oras push ${REGISTRY}/$REPO:artifact-config \
--manifest-config ./artifact-config.json:application/x.sample.v1+json \
./artifact.txt:application/txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you like to use recommended mime types like text/plain?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types

Copy link
Contributor

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is better to be codified. Perhaps a bash script that runs these commands, taking REGISTRY_URL REGISTRY_NAMESPACE REGISTRY_USERNAME REGISTRY_PASSWORD as env vars

@jdolitsky
Copy link
Contributor

Can also wrap this in robot framework to get some better output. See this example in Helm: https://github.com/helm/acceptance-testing/blob/main/testsuites/repos.robot

@SteveLasker
Copy link
Contributor Author

👀
Thanks, folks. I'll get this incorporated next week.

@sajayantony
Copy link
Contributor

Should we decide if this is the roadmap or not and close the PR?

@SteveLasker
Copy link
Contributor Author

Yes, it's something I'd like to see incorporated.
I'm probably not the right person to write that code.
As it stands, this PR has helped others validate their registries support the OCI Artifacts requirements. So, it's useful even if just open. Better if it was merged as Josh suggested.

@sajayantony
Copy link
Contributor

sajayantony commented Nov 8, 2022

This was a good starting point for the discussions that lead OCI artifacts. Given that we now have - https://github.com/opencontainers/distribution-spec/tree/main/conformance and ORAS repo has all the E2E tests planned do we need this PR or can we close it @SteveLasker
ref : #639

@SteveLasker
Copy link
Contributor Author

This was initially created to help docker enable oci artifacts. Now that they’re done, every other registry now enables OcI Artifacts, and there’s better codified solution, happy to close this one.

@SteveLasker SteveLasker closed this Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants