dockerfile

package
v0.0.0-...-52ff394 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegistryRegex = regexp.MustCompile(`(registry\.(?:svc\.)?ci\.openshift\.org|quay-proxy\.ci\.openshift\.org)/[^\s\\]+`)

RegistryRegex matches registry references to registry.ci.openshift.org or quay-proxy.ci.openshift.org

Functions

func DetectInputsFromDockerfile

func DetectInputsFromDockerfile(dockerfile []byte, existingInputs map[string]api.ImageBuildInputs, from api.PipelineImageStreamTagReference) map[string]api.ImageStreamTagReference

DetectInputsFromDockerfile parses a Dockerfile and detects registry references that need to be added as base images Returns a map of base image names to ImageStreamTagReferences The ImageStreamTagReference.As field contains the original registry reference from the Dockerfile

func ExtractRegistryReferences

func ExtractRegistryReferences(dockerfile []byte, from api.PipelineImageStreamTagReference) []string

ExtractRegistryReferences finds all registry.ci.openshift.org and quay-proxy.ci.openshift.org references in the Dockerfile

func HasManualReplacementFor

func HasManualReplacementFor(inputs map[string]api.ImageBuildInputs, target string) bool

HasManualReplacementFor checks if there's already a manual input configuration for the given reference

Types

type OrgRepoTag

type OrgRepoTag struct {
	Org, Repo, Tag string
}

OrgRepoTag represents a parsed image reference

func OrgRepoTagFromPullString

func OrgRepoTagFromPullString(pullString string) (OrgRepoTag, error)

OrgRepoTagFromPullString parses a pull string like "registry.ci.openshift.org/ocp/4.19:base" into its component parts (org, repo, tag) For quay-proxy references, the tag contains org_repo_tag format that needs special parsing

func (OrgRepoTag) String

func (ort OrgRepoTag) String() string

Jump to

Keyboard shortcuts

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