You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the dual-Dockerfile approach (.rhdh/docker/Dockerfile + Dockerfile) with a single Dockerfile using ARG HERMETIC=false to conditionally skip dnf/microdnf updates and source /cachi2/cachi2.env in hermetic (Konflux+Cachi2) builds.
Add a GitHub Actions workflow (pr-hermetic-build.yaml) that runs on every PR, using Hermeto to prefetch Go modules and RPMs, then builds with --network=none to catch hermetic build failures upstream before they reach downstream.
Unify Dockerfile with HERMETIC arg and add hermetic PR build workflow ✨ Enhancement⚙️ Configuration changes🕐 40+ Minutes
Description
• Replace dual Dockerfiles with one Dockerfile gated by ARG HERMETIC for Konflux+Cachi2 builds.
• Add a PR GitHub Actions workflow that prefetches deps via Hermeto and builds with network
disabled.
• Update rpm-lockfile automation and Makefile targets to use the unified Dockerfile.
The following are alternative approaches to this PR:
1. Keep a dedicated hermetic Dockerfile
➕ Avoids CI-time Dockerfile mutation via sed
➕ Reduces risk of transform logic breaking on future Dockerfile refactors
➖ Reintroduces drift between Dockerfiles (the problem this PR fixes)
➖ More maintenance and review overhead for build changes
2. Use BuildKit-native mounts instead of sed transforms
➕ More robust than rewriting Dockerfile text
➕ Can explicitly mount repo files and pre-fetched deps via build mounts
➖ Requires BuildKit/buildx support; current workflow uses buildah-build
➖ May diverge from Konflux/buildah behavior you’re trying to simulate
Recommendation: Current approach (single Dockerfile + hermetic PR workflow) is the best fit for keeping build logic unified while catching hermetic failures early. The main risk is the sed-based Dockerfile transformation in CI; keep the Dockerfile’s RUN formatting stable (or add a small validation step) to avoid future breakage, and fall back to a separate hermetic Dockerfile only if transforms become too brittle.
Files changed (6) +195 / -14
Documentation (1) +1 / -1
rpms.in.yamlUpdate rpm-lockfile-prototype instructions to reference Dockerfile+1/-1
Update rpm-lockfile-prototype instructions to reference Dockerfile
• Adjusts the comment showing how to regenerate rpms.lock.yaml so the lockfile tool uses the unified Dockerfile path.
action.yamlAdd composite action for Hermeto-prefetch + offline buildah build+132/-0
Add composite action for Hermeto-prefetch + offline buildah build
• Introduces a composite GitHub Action that uses Hermeto to prefetch RPM and Go module dependencies, generates cachi2.env, and injects prefetched artifacts. It then transforms the Dockerfile to source /cachi2/cachi2.env and point yum repos at hermeto output, finally building with buildah using --network=none and mounting the cache volume.
pr-hermetic-build.yamlAdd PR workflow to run hermetic image build on every PR+49/-0
Add PR workflow to run hermetic image build on every PR
• Adds a pull_request workflow targeting main and release branches. The job checks out the repo and invokes the new composite docker-build action to build a tagged hermetic PR image for linux/amd64.
update-rpm-lockfile.yamlSwitch rpm lockfile workflow to use the unified Dockerfile+2/-2
Switch rpm lockfile workflow to use the unified Dockerfile
• Updates the workflow path filters and DOCKERFILE_PATH env var to point at Dockerfile instead of .rhdh/docker/Dockerfile, aligning lockfile regeneration with the single-Dockerfile approach.
DockerfileGate dnf/microdnf updates and cachi2.env usage behind ARG HERMETIC+7/-11
Gate dnf/microdnf updates and cachi2.env usage behind ARG HERMETIC
• Adds ARG HERMETIC to both build and runtime stages. Replaces unconditional dnf/microdnf update steps with conditional execution when HERMETIC=false, and conditionally cats /cachi2/cachi2.env when HERMETIC=true to support Konflux+Cachi2 hermetic builds.
MakefileAdd image-build-hermetic target that sets HERMETIC=true+4/-0
Add image-build-hermetic target that sets HERMETIC=true
• Adds a new make target to build the container image with --build-arg HERMETIC=true. This provides a local/manual way to simulate the hermetic build path without maintaining a separate Dockerfile.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the dual-Dockerfile approach (
.rhdh/docker/Dockerfile+Dockerfile) with a single Dockerfile usingARG HERMETIC=falseto conditionally skipdnf/microdnfupdates and source/cachi2/cachi2.envin hermetic (Konflux+Cachi2) builds.Add a GitHub Actions workflow (
pr-hermetic-build.yaml) that runs on every PR, using Hermeto to prefetch Go modules and RPMs, then builds with--network=noneto catch hermetic build failures upstream before they reach downstream.Description
Which issue(s) does this PR fix or relate to
PR acceptance criteria
How to test changes / Special notes to the reviewer