Skip to content

OCI registry as alternative to storing release assets in Github #157

@guettli

Description

@guettli

/kind feature

OCI registry as alternative to storing release assets in Github

We want to add a new plugin to OCI registries, to allow a generic form of storing release assets that is not dependent on a certain provider (e.g. Github).

For this, we need multiple steps.

  1. We have to re-write current code that is Github-specific. We already have an interface approach, which is good, but the interface contains Github-specific code, which we have to change.
  2. We rename the interface to a generic naming pattern that is not Githubspecific.
  3. We add a new implementation of the existing interface, so that we have Github and OCI.

We will use the Go package https://github.com/oras-project/oras-go.

The interface will look something like this:

type Client interface {
    ListRelease(ctx context.Context) ([]string, error)
    DownloadReleaseAssets(ctx context.Context, releaseTag, path string) error
}

We can use the method https://pkg.go.dev/oras.land/oras-go/v2/registry/remote#example-Repository.Tags to list releases and https://pkg.go.dev/oras.land/oras-go/v2#example-Copy-RemoteToLocal to download the assets.

Tasks

Metadata

Metadata

Assignees

Labels

ContainerIssues or pull requests relevant for Team 2: Container Infra and Tooling

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions