registrygitlab

package
v0.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package registrygitlab provides the GitLab Container Registry provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthHeaderFor added in v0.14.1

func AuthHeaderFor(tokenType string) string

AuthHeaderFor returns the correct GitLab API auth header name for tokenType. Exported for testing. tokenType is "job" (CI_JOB_TOKEN) or "private" (PAT/oauth2).

func New

New returns a new GitLabProvider.

Types

type GitLabProvider

type GitLabProvider struct{}

GitLabProvider implements registry.RegistryProvider for GitLab Container Registry.

func (*GitLabProvider) Login

Login authenticates with the GitLab registry host. In CI context ($CI_JOB_TOKEN set), uses gitlab-ci-token as username. Otherwise uses oauth2 with the token from auth.env.

func (*GitLabProvider) Logout

func (*GitLabProvider) Name

func (g *GitLabProvider) Name() string

func (*GitLabProvider) Prune

Prune deletes tags beyond retention.keep_latest via the GitLab Container Registry API. Supports self-managed instances via ci.registries[].api_base_url.

func (*GitLabProvider) Push

func (g *GitLabProvider) Push(ctx registry.Context, cfg registry.ProviderConfig, imageRef string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL