ci-tools
ci-tools copied to clipboard
ci-operator: add automatic dockerfile inputs detection
Added pkg/dockerfile/inputs.go - Core detection logic:
- Automatically detects
registry.ci.openshift.organdquay-proxy.ci.openshift.orgreferences in Dockerfiles - Parses references into
org/repo/tagcomponents - Generates
base_imagesandinputs.as[]configuration on-the-fly - Using registry-replacer's detection logic
Integrated into pkg/defaults/defaults.go:
- New
detectDockerfileInputs()function reads Dockerfiles from source checkout - Calls
DetectInputsFromDockerfile()during build graph construction - Creates input steps that tag detected base images into the pipeline ImageStream
- Respects manual configuration (manual
inputs.as[]takes precedence)
Real example config using a mocked prowjob: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_cluster-api-operator/63/prucek-test-dockerfile-inputs/2009259226555224064