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

Import of provisioners from private OCI registry/image #60

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

7h3-3mp7y-m4n
Copy link
Contributor

Description

Added the docker login support

as mentioned here: https://github.com/oras-project/oras-go/blob/main/example_test.go#L106

What does this PR do?

This PR supports dynamic login which uses $DOCKER_CONFIG/config.json for login..

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • New chore (expected functionality to be implemented)

Checklist:

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I've signed off with an email address that matches the commit author.

@7h3-3mp7y-m4n
Copy link
Contributor Author

the following code was added from https://github.com/oras-project/oras-go/blob/main/example_test.go#L122
while the old test cases tested it, it spits no error, so adding some logged output showed some clarity ...
=== RUN ExampleGetFile_oci_https 2024/11/20 00:24:49 Starting getOci for URL: oci://ghcr.io/score-spec/score-compose-community-provisioners:v0.1.0#00-service.provisioners.yaml 2024/11/20 00:24:49 Parsed reference: ghcr.io/score-spec/score-compose-community-provisioners:v0.1.0, with tag: v0.1.0 2024/11/20 00:24:49 Specified file from fragment: 00-service.provisioners.yaml 2024/11/20 00:24:49 Docker credentials successfully loaded 2024/11/20 00:24:49 Connected to remote repository: ghcr.io/score-spec/score-compose-community-provisioners:v0.1.0 2024/11/20 00:24:49 Fetching manifest for reference: v0.1.0 2024/11/20 00:24:50 Manifest fetched and decoded successfully 2024/11/20 00:24:50 Searching for YAML files in manifest layers 2024/11/20 00:24:50 Checking layer: 00-redis-dapr-state-store.provisioners.yaml 2024/11/20 00:24:50 Found YAML file: 00-redis-dapr-state-store.provisioners.yaml (count: 1) 2024/11/20 00:24:50 Checking layer: 00-service.provisioners.yaml 2024/11/20 00:24:50 Found YAML file: 00-service.provisioners.yaml (count: 2) 2024/11/20 00:24:50 Selected layer for file: 00-service.provisioners.yaml 2024/11/20 00:24:50 Fetching blob for layer: sha256:be27ce16ed6916c35fe0a08f56c4a86e884d6b40a8273c6031d6d772a8fccfb0 2024/11/20 00:24:50 Reading blob content with limit: 1073741824 bytes 2024/11/20 00:24:50 Successfully read 231 bytes from file: 00-service.provisioners.yaml 2024/11/20 00:24:51 Read 231 bytes from GET https://github.com/score-spec/community-provisioners/raw/v0.1.0/score-compose/00-service.provisioners.yaml --- PASS: ExampleGetFile_oci_https (2.11s)
I haven't tested it yet with a private repository, I'll update it according and add a test case for it as well

@mathieu-benoit
Copy link
Contributor

@7h3-3mp7y-m4n , like discussed, please provide the instructions to reproduce/test this new feature.
Maybe with a local registry. Maybe with this local registry setup: https://oras.land/docs/compatible_oci_registries#cncf-distribution?

@7h3-3mp7y-m4n
Copy link
Contributor Author

for sure I'll post the steps and also the output ASAP!

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.

[bug] Support import of provisioners from private OCI/image registry
2 participants