Skip to content

ART-21305: add BuildConfig for rpm-lockfile-prototype image#3035

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-eng:mainfrom
fgallott:rpm-lockfile-image-buildconfig
Jul 13, 2026
Merged

ART-21305: add BuildConfig for rpm-lockfile-prototype image#3035
openshift-merge-bot[bot] merged 1 commit into
openshift-eng:mainfrom
fgallott:rpm-lockfile-image-buildconfig

Conversation

@fgallott

@fgallott fgallott commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Add art-cluster infrastructure to build and serve the rpm-lockfile-prototype container image from the art-cd namespace.

  • ImageStream for rpm-lockfile-prototype
  • BuildConfig that builds from bundled Containerfile (Fedora + python3-dnf + RH IT CAs, pinned to v0.23.0)
  • ServiceAccount + RoleBinding (rpm-lockfile-image-puller) for Jenkins pull access
  • Containerfile at art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype

This is part of the effort to containerize rpm-lockfile-prototype execution (see #3031), removing the dependency on host-installed python3-dnf.

Post-merge steps

After ArgoCD deploys these resources to art-cd:

  1. Generate a pull token (valid 1 year):
    oc create token rpm-lockfile-image-puller -n art-cd --duration=8760h
  2. Store the token in AWS Secrets Manager so Jenkins can sync it
  3. Configure Jenkins to use the token for podman login:
    podman login default-route-openshift-image-registry.apps.artc2023.pc3z.p1.openshiftapps.com
    -u rpm-lockfile-image-puller -p
  4. Set up GitHub webhook (optional) — add webhook URL in openshift-eng/art-tools repo settings pointing to the BuildConfig, so Containerfile changes auto-trigger rebuilds
  5. Follow-up PR in art-tools — update RpmResolver to pull from art-cluster registry instead of building on demand (ART-21305: run rpm-lockfile-prototype in podman container #3031)

Summary by CodeRabbit

  • New Features
    • Added an OpenShift BuildConfig for rpm-lockfile-prototype to build and publish a versioned image to an ImageStreamTag.
    • Added an ImageStream for rpm-lockfile-prototype and introduced a new container build definition that installs required tooling and the prototype tool.
  • Security / Access
    • Added RBAC for rpm-lockfile-image-puller (service account + role binding) to allow controlled image pulls.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 8, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 8, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 8, 2026

Copy link
Copy Markdown

@fgallott: This pull request references ART-18202 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Add ImageStream, BuildConfig, and ServiceAccount+RoleBinding to build and serve the rpm-lockfile-prototype container image from art-cluster.

  • Containerfile: Fedora base with python3-dnf, skopeo, RH IT CA certs
  • BuildConfig outputs to ImageStreamTag rpm-lockfile-prototype:v0.22.0
  • ServiceAccount rpm-lockfile-image-puller for Jenkins pull access
  • Triggers: ConfigChange + GitHub webhook

After deployment, generate a pull token:

oc create token rpm-lockfile-image-puller -n art-cd --duration=8760h

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift-eng/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a180e8ed-5ef0-44e5-892a-48a86d75ff58

📥 Commits

Reviewing files that changed from the base of the PR and between 73035aa and 15e257b.

📒 Files selected for processing (4)
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_build.yaml
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_image.yaml
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_pull_access.yaml
  • art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype
🚧 Files skipped from review as they are similar to previous changes (4)
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_image.yaml
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_pull_access.yaml
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_build.yaml
  • art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype

Walkthrough

This PR adds a UBI9-based rpm-lockfile-prototype container image, an OpenShift BuildConfig and ImageStream targeting v0.25.0, and RBAC resources for image-pull access.

Changes

rpm-lockfile-prototype image

Layer / File(s) Summary
Container image definition
art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype
Defines configurable base image and Git ref arguments, installs required tooling and internal CA certificates, installs rpm-lockfile-prototype from GitHub, and configures its entrypoint.
Build orchestration and image registry
art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_build.yaml, art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_image.yaml
Creates the ImageStream and configures a serial BuildConfig sourced from openshift-eng/art-tools at main, outputting rpm-lockfile-prototype:v0.25.0 with build history retention.
Image access control
art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_pull_access.yaml
Creates the rpm-lockfile-image-puller ServiceAccount and binds it to the system:image-puller ClusterRole in the art-cd namespace.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a BuildConfig for the rpm-lockfile-prototype image.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Weak-Crypto ✅ Passed No MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons were found in the changed files.
Container-Privileges ✅ Passed No privileged, host*, SYS_ADMIN, or allowPrivilegeEscalation settings appear; the Containerfile’s root use is explicitly justified in comments.
No-Sensitive-Data-In-Logs ✅ Passed No new log/echo/print statements expose secrets; changed files only add YAML manifests and a Containerfile with no sensitive values emitted to logs.
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets found; added YAML/Containerfile contain only public URLs, image names, and a pullSecret reference, with no literal creds or base64 blobs.
No-Injection-Vectors ✅ Passed No listed injection sinks appear in the new YAML or Containerfile; the changes are static manifests and Docker build steps only.
Ai-Attribution ✅ Passed No AI-tool references appear in the commit or changed files, and the HEAD commit has no Assisted-by/Generated-by/Co-Authored-By trailers.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

fgallott added a commit to fgallott/art-tools that referenced this pull request Jun 9, 2026
Switch from building the rpm-lockfile-prototype container locally
to pulling the pre-built image from the art-cluster internal registry.
The image is now built and served via BuildConfig in art-cd (PR openshift-eng#3035).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@ashwindasr

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 9, 2026
@fgallott
fgallott force-pushed the rpm-lockfile-image-buildconfig branch from fc001f2 to f949b57 Compare June 9, 2026 15:43
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 9, 2026
@fgallott
fgallott force-pushed the rpm-lockfile-image-buildconfig branch from f949b57 to 6ec4f41 Compare June 9, 2026 15:44
@fgallott
fgallott marked this pull request as ready for review June 9, 2026 15:44
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_build.yaml (1)

9-9: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

spec.source.dockerfile is being used as a path, not inline content.

Line 9 should not point to a file path; this field is for literal Dockerfile text and can conflict with dockerfilePath on Line 16. Keep only dockerStrategy.dockerfilePath.

In OpenShift BuildConfig (build.openshift.io/v1), what is the exact contract of `spec.source.dockerfile` versus `spec.strategy.dockerStrategy.dockerfilePath`, and which one takes precedence when both are set?
Proposed change
 spec:
   source:
-    dockerfile: art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype
     git:
       ref: main
       uri: https://github.com/openshift-eng/art-tools
     type: Git

Also applies to: 16-16

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_build.yaml`
at line 9, spec.source.dockerfile currently contains a filesystem path (it
should be literal Dockerfile text), so remove that line and rely solely on
spec.strategy.dockerStrategy.dockerfilePath for pointing to the Containerfile;
alternatively, if you intended inline Dockerfile content, replace
spec.source.dockerfile's value with the actual Dockerfile text and remove
spec.strategy.dockerStrategy.dockerfilePath. Locate the keys
spec.source.dockerfile and spec.strategy.dockerStrategy.dockerfilePath in
rpm_lockfile_build.yaml and apply one of the two fixes so they are not both set
(dockerfilePath wins if both are present).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_build.yaml`:
- Around line 11-13: The manifest uses a mutable source ref ("ref: main") while
producing an immutable output tag ("rpm-lockfile-prototype:v0.22.0"), which
allows future changes on main to overwrite that tag; change the source ref to a
release commit or branch that corresponds to v0.22.0 (e.g., the git tag/commit
SHA for v0.22.0) or else make the output tag mutable (e.g., include
build-specific suffix or use a float tag) so that rpm-lockfile-prototype:v0.22.0
is not silently overwritten; update the "ref" field (currently "main") to the
pinned release reference or modify the output tag string to a mutable form.

---

Duplicate comments:
In
`@art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_build.yaml`:
- Line 9: spec.source.dockerfile currently contains a filesystem path (it should
be literal Dockerfile text), so remove that line and rely solely on
spec.strategy.dockerStrategy.dockerfilePath for pointing to the Containerfile;
alternatively, if you intended inline Dockerfile content, replace
spec.source.dockerfile's value with the actual Dockerfile text and remove
spec.strategy.dockerStrategy.dockerfilePath. Locate the keys
spec.source.dockerfile and spec.strategy.dockerStrategy.dockerfilePath in
rpm_lockfile_build.yaml and apply one of the two fixes so they are not both set
(dockerfilePath wins if both are present).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 2cf86b34-c89c-4fec-abff-0b7407d4c2cb

📥 Commits

Reviewing files that changed from the base of the PR and between aac11d0 and 6ec4f41.

📒 Files selected for processing (4)
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_build.yaml
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_image.yaml
  • art-cluster/pipelines/config/argocd/project/art-cd/common/image/rpm_lockfile_pull_access.yaml
  • art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype

@fgallott
fgallott force-pushed the rpm-lockfile-image-buildconfig branch 2 times, most recently from 106e7b3 to 73035aa Compare June 19, 2026 13:40
@fgallott fgallott changed the title ART-18202: add BuildConfig for rpm-lockfile-prototype image ART-21305: add BuildConfig for rpm-lockfile-prototype image Jun 26, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 26, 2026

Copy link
Copy Markdown

@fgallott: This pull request references ART-21305 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Add art-cluster infrastructure to build and serve the rpm-lockfile-prototype container image from the art-cd namespace.

  • ImageStream for rpm-lockfile-prototype
  • BuildConfig that builds from bundled Containerfile (Fedora + python3-dnf + RH IT CAs, pinned to v0.23.0)
  • ServiceAccount + RoleBinding (rpm-lockfile-image-puller) for Jenkins pull access
  • Containerfile at art-cluster/pipelines/data/project/art-cd/image/Containerfile.rpm_lockfile_prototype

This is part of the effort to containerize rpm-lockfile-prototype execution (see #3031), removing the dependency on host-installed python3-dnf.

Post-merge steps

After ArgoCD deploys these resources to art-cd:

  1. Generate a pull token (valid 1 year):
    oc create token rpm-lockfile-image-puller -n art-cd --duration=8760h
  2. Store the token in AWS Secrets Manager so Jenkins can sync it
  3. Configure Jenkins to use the token for podman login:
    podman login default-route-openshift-image-registry.apps.artc2023.pc3z.p1.openshiftapps.com
    -u rpm-lockfile-image-puller -p
  4. Set up GitHub webhook (optional) — add webhook URL in openshift-eng/art-tools repo settings pointing to the BuildConfig, so Containerfile changes auto-trigger rebuilds
  5. Follow-up PR in art-tools — update RpmResolver to pull from art-cluster registry instead of building on demand (ART-21305: run rpm-lockfile-prototype in podman container #3031)

Summary by CodeRabbit

  • New Features

  • Added a new rpm-lockfile-prototype OpenShift build that produces and publishes a versioned Docker image to an ImageStreamTag.

  • Introduced a new container image definition for rpm-lockfile-prototype, including CA trust setup and automated installation of the prototype tool.

  • Security / Access

  • Added RBAC for rpm-lockfile-image-puller, enabling controlled image pull permissions via the standard image-puller role.

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 openshift-eng/jira-lifecycle-plugin repository.

Add ImageStream, BuildConfig, and ServiceAccount+RoleBinding to build
and serve the rpm-lockfile-prototype container image from art-cluster.

- Containerfile: Fedora base with python3-dnf, skopeo, RH IT CA certs
- BuildConfig outputs to ImageStreamTag rpm-lockfile-prototype:v0.23.0
- ServiceAccount rpm-lockfile-image-puller for Jenkins pull access

After deployment, generate a pull token:
  oc create token rpm-lockfile-image-puller -n art-cd --duration=8760h

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
@fgallott
fgallott force-pushed the rpm-lockfile-image-buildconfig branch from 73035aa to 15e257b Compare July 13, 2026 13:57
@openshift-ci

openshift-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@fgallott: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 15e257b link false /test security

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

output:
to:
kind: ImageStreamTag
name: rpm-lockfile-prototype:v0.25.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also have ARG GIT_REF=tags/v0.25.0 in the Containerfile, and presumably also a similar tag on the consumption side. Could we have that tag as a single config, that gets passed as arg and as tag?

@joepvd

joepvd commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

/lgtm
/approve
yet:
/hold
to give the possibility to address the comment (it is fine to not do that now)

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 13, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2026
@openshift-ci

openshift-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joepvd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 13, 2026
@fgallott

Copy link
Copy Markdown
Contributor Author

mmm BuildConfig doesn't support variable interpolation in output.to.name, so it's not that easy to do
unholding for the moment and I'll think about it later

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 13, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 8d315ea into openshift-eng:main Jul 13, 2026
4 of 5 checks passed
fgallott added a commit to fgallott/art-tools that referenced this pull request Jul 13, 2026
Switch from building the rpm-lockfile-prototype container locally
to pulling the pre-built image from the art-cluster internal registry.
The image is now built and served via BuildConfig in art-cd (PR openshift-eng#3035).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@fgallott
fgallott deleted the rpm-lockfile-image-buildconfig branch July 16, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants