Documentation
¶
Index ¶
- Variables
- func DetectInputsFromDockerfile(dockerfile []byte, existingInputs map[string]api.ImageBuildInputs, ...) map[string]api.ImageStreamTagReference
- func ExtractRegistryReferences(dockerfile []byte, from api.PipelineImageStreamTagReference) []string
- func HasManualReplacementFor(inputs map[string]api.ImageBuildInputs, target string) bool
- type OrgRepoTag
Constants ¶
This section is empty.
Variables ¶
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