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

Update to oras.land/oras-go v1.1.0 #117

Merged
merged 2 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: 1.13
go-version: 1.17

- name: Check if index-generator build is working
run: cd index/generator && ./build.sh
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: 1.13
go-version: 1.17
- name: Setup Minikube
uses: manusa/[email protected]
with:
Expand Down
9 changes: 4 additions & 5 deletions registry-library/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ module github.com/devfile/registry-support/registry-library
go 1.14

require (
github.com/containerd/containerd v1.5.2
github.com/containerd/containerd v1.5.9
github.com/devfile/registry-support/index/generator v0.0.0-20220222194908-7a90a4214f3e
github.com/hashicorp/go-version v1.4.0
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.1.1
github.com/spf13/viper v1.7.1
oras.land/oras-go v0.4.0
rsc.io/letsencrypt v0.0.3 // indirect
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.8.1
oras.land/oras-go v1.1.0
)
335 changes: 298 additions & 37 deletions registry-library/go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions registry-library/library/library.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,11 @@ func PullStackByMediaTypesFromRegistry(registry string, stack string, allowedMed

resolver := docker.NewResolver(docker.ResolverOptions{Headers: headers, PlainHTTP: plainHTTP, Client: httpClient})
ref := path.Join(urlObj.Host, stackLink)
fileStore := content.NewFileStore(destDir)
fileStore := content.NewFile(destDir)
defer fileStore.Close()

// Pull stack from registry and save it to disk
_, _, err = oras.Pull(ctx, resolver, ref, fileStore, oras.WithAllowedMediaTypes(allowedMediaTypes))
_, err = oras.Copy(ctx, resolver, ref, fileStore, ref, oras.WithAllowedMediaTypes(allowedMediaTypes))
if err != nil {
return fmt.Errorf("failed to pull stack %s from %s with allowed media types %v: %v", stack, ref, allowedMediaTypes, err)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading