Documentation
¶
Index ¶
- type Registry
- func (r *Registry) Address() string
- func (r *Registry) CreateAllManifests(project *model.ContainerHiveProject, filters []build.Filter, ...) error
- func (r *Registry) ImageRef(imageName, tag, platformStr, buildID string) string
- func (r *Registry) IsLocal() bool
- func (r *Registry) Push(ctx context.Context, imageName, tag, ociTarPath string) error
- func (r *Registry) RetagAllAliases(project *model.ContainerHiveProject, filters []build.Filter, buildID string) error
- func (r *Registry) Start(ctx context.Context) error
- func (r *Registry) Stop(ctx context.Context) error
- func (r *Registry) UseDockerMediaTypes() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry wraps the internal registry and adds alias retagging.
func NewRegistry ¶
func NewRegistry(dataDir string, registryConfig *model.RegistryConfig) (*Registry, error)
NewRegistry creates a Registry based on the environment (local zot or remote). The dataDir parameter sets persistent storage for the local registry; if empty, a temporary directory is used. The registryConfig is read from hive.yml and provides the registry address for CI pushes.
func (*Registry) CreateAllManifests ¶
func (r *Registry) CreateAllManifests(project *model.ContainerHiveProject, filters []build.Filter, buildID, distPath string) error
CreateAllManifests creates multi-arch manifest lists for all tags of all images matching the filters. Each manifest combines the platform-specific images whose OCI tars are in distPath. Descriptor info is read from local tars to avoid registry compatibility issues with OCI manifest GET.
func (*Registry) ImageRef ¶
ImageRef returns the full registry reference for a platform-specific image. Format: address/imageName:tag.sanitized-platform[.buildID]
func (*Registry) RetagAllAliases ¶
func (r *Registry) RetagAllAliases(project *model.ContainerHiveProject, filters []build.Filter, buildID string) error
RetagAllAliases retags aliases for all images in the project. Aliases point to multi-arch manifests (created by CreateAllManifests), not to platform-specific images. If filters is non-empty, only images matching at least one filter are processed. If buildID is set, tags are suffixed with .<buildID> to match pushed tags.
func (*Registry) UseDockerMediaTypes ¶ added in v0.10.0
UseDockerMediaTypes reports whether image manifests and the manifest list should be emitted in Docker-scheme media types rather than OCI. Docker Hub's frontend rejects pure OCI indexes, so pushes to docker.io (or a configured mirror marked as Docker-scheme via hive.yml) need this flag.