Repository navigation
feat: build operator images hermetically in upstream repo [RHIDP-15044] - #3359
Conversation
PR Summary by QodoHermetic operator image builds in upstream CI via Hermeto
AI Description
Diagram
High-Level Assessment
Files changed (15)
|
Code Review by Qodo
1.
|
|
/agentic_review |
|
@qodo regarding Hermeto image tag unpinned this is intentional as of why I skipped it because the team previously decided against pinning |
|
Code review by qodo was updated up to the latest commit e0dbfad |
polasudo
left a comment
There was a problem hiding this comment.
as comments were addressed, LGTM
|
New changes are detected. LGTM label has been removed. |
Consolidate upstream and downstream Dockerfiles into a single unified Dockerfile that works with both Hermeto (upstream) and Cachi2 (Konflux) hermetic builds. This catches build issues at PR time instead of waiting for downstream Konflux builds. - Remove dnf/microdnf update commands and downstream comment toggles from Dockerfile (RPMs managed via rpms.lock.yaml) - Delete .rhdh/docker/Dockerfile (consolidated into root Dockerfile) - Add .github/actions/docker-build composite action for hermetic builds using Hermeto (pre-fetch deps, transform Dockerfile, build with --network none) - Add scripts/local-hermeto-build.sh for local hermetic build testing - Update PR validation workflow to use hermetic builds - Update main CI and PR image build workflows to build operator image hermetically - Add multi-arch (x86_64 + aarch64) support to rpms.in.yaml and regenerate rpms.lock.yaml - Update all references from .rhdh/docker/Dockerfile to root Dockerfile - Add hermetic-build Makefile target and developer documentation Signed-off-by: fndlovu@redhat.com
Cache the hermeto dependency cache (Go modules + RPMs) in GitHub Actions keyed on go.sum + rpms.lock.yaml. When deps haven't changed, only generate-env and inject-files run (~30s) instead of the full fetch-deps (~3-5 min). The hermetic build with --network none still runs every time. Signed-off-by: fndlovu@redhat.com
- Ensure podman is available in composite action (self-sufficient) - Quote $GITHUB_ENV and $GITHUB_OUTPUT variable expansions - Use readarray for safe tag handling in podman save - Combine set -e and set -uo pipefail into single set -euo pipefail - Guard EXIT trap rm -rf with || true to prevent cleanup failures - Pass resolved component dir to build_cache() instead of using $PWD - Remove unnecessary -ti flags from podman run invocations Signed-off-by: fndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
Pin quay.io/konflux-ci/hermeto from :latest to :0.60.1 in both the CI composite action and local build script to avoid unexpected updates. Added renovate comment hint so version bumps are automated. Signed-off-by: fndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
A go.mod-only change (new module path, replace directive, Go version bump) without a go.sum change could hit stale cache and skip fetch-deps, leaving stale output for a --network=none build. Signed-off-by: fndlovu <fndlovu@redhat.com> Signed-off-by: Fortune-Ndlovu <fndlovu@redhat.com>
f866119 to
2296fa4
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
…(RHIDP-14882) .rhdh/docker/Dockerfile (the file Konflux/Cachi2 builds actually used) was already consolidated into the root Dockerfile by the upstream hermetic-build refactor (redhat-developer#3359), so it no longer exists after rebasing onto main. .rhdh/docker/bundle.Dockerfile was untouched by that refactor and was still left on ubi9 by the initial migration commit. Assisted-by: Claude Code
…(RHIDP-14882) .rhdh/docker/Dockerfile (the file Konflux/Cachi2 builds actually used) was already consolidated into the root Dockerfile by the upstream hermetic-build refactor (redhat-developer#3359), so it no longer exists after rebasing onto main. .rhdh/docker/bundle.Dockerfile was untouched by that refactor and was still left on ubi9 by the initial migration commit. Assisted-by: Claude Code
…(RHIDP-14882) .rhdh/docker/Dockerfile (the file Konflux/Cachi2 builds actually used) was already consolidated into the root Dockerfile by the upstream hermetic-build refactor (redhat-developer#3359), so it no longer exists after rebasing onto main. .rhdh/docker/bundle.Dockerfile was untouched by that refactor and was still left on ubi9 by the initial migration commit. Assisted-by: Claude Code
…(RHIDP-14882) .rhdh/docker/Dockerfile (the file Konflux/Cachi2 builds actually used) was already consolidated into the root Dockerfile by the upstream hermetic-build refactor (redhat-developer#3359), so it no longer exists after rebasing onto main. .rhdh/docker/bundle.Dockerfile was untouched by that refactor and was still left on ubi9 by the initial migration commit. Assisted-by: Claude Code
…(RHIDP-14882) .rhdh/docker/Dockerfile (the file Konflux/Cachi2 builds actually used) was already consolidated into the root Dockerfile by the upstream hermetic-build refactor (redhat-developer#3359), so it no longer exists after rebasing onto main. .rhdh/docker/bundle.Dockerfile was untouched by that refactor and was still left on ubi9 by the initial migration commit. Assisted-by: Claude Code
…DP-14882) (#3368) * feat(operator): migrate operator container build to UBI10/RHEL10 (RHIDP-14882) Switch builder and runtime base images to ubi10, update RPM lockfile, and point bundle/CSV image refs to rhdh-rhel10-operator. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(operator): migrate Konflux downstream bundle Dockerfile to UBI10 (RHIDP-14882) .rhdh/docker/Dockerfile (the file Konflux/Cachi2 builds actually used) was already consolidated into the root Dockerfile by the upstream hermetic-build refactor (#3359), so it no longer exists after rebasing onto main. .rhdh/docker/bundle.Dockerfile was untouched by that refactor and was still left on ubi9 by the initial migration commit. Assisted-by: Claude Code * update Dockerfile and rpms.lock Signed-off-by: rhdh-bot <rhdh-bot@redhat.com> --------- Signed-off-by: rhdh-bot <rhdh-bot@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Nick Boldt <nboldt@redhat.com> Co-authored-by: rhdh-bot <rhdh-bot@redhat.com>



Consolidate upstream and downstream Dockerfiles into a single unified Dockerfile that works with both Hermeto (upstream) and Cachi2 (Konflux) hermetic builds. This catches build issues at PR time instead of waiting for downstream Konflux builds.
Fixes: https://redhat.atlassian.net/browse/RHIDP-15044
PR acceptance criteria
How to test changes / Special notes to the reviewer
Building Container Images for Testing
Need to test container images from this PR?
For Maintainers: To trigger a test image build, review the code and comment
/build-images.This always builds the HEAD of the PR branch.
For Contributors: Ask a maintainer to run
/build-images.Images will be built and pushed to Quay with links posted in comments.