chore(KONFLUX-6210): fix and set name and cpe label for recert#581
chore(KONFLUX-6210): fix and set name and cpe label for recert#581fontivan merged 1 commit intorh-ecosystem-edge:mainfrom
Conversation
For https://issues.redhat.com/browse/KONFLUX-6210, clair needs access to a name and cpe label that it can use to look up the image in VEX statements. See also release-engineering/rhtap-ec-policy#149 Based on original changes from @rbean in our other operator repos Assisted-by: Gemini
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fontivan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
WalkthroughAdds a new array parameter additional-labels to the Tekton build pipeline and passes it through PipelineRuns for PR and push. Updates the image build step to include values from this parameter and replaces a hard-coded label with a new cpe label. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer/Trigger
participant PR as PipelineRun (PR/Push)
participant PL as Pipeline (build-pipeline)
participant BI as Task: build-images
participant REG as Image Registry
Dev->>PR: Create/Run PipelineRun\n(with params.additional-labels)
PR->>PL: Start pipeline\n(pass additional-labels)
PL->>BI: Execute build-images\n(LABELS += additional-labels,\nreplace static label with CPE)
BI->>REG: Push built image\n(with computed labels)
REG-->>Dev: Image available (labels applied)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.tekton/build-pipeline.yaml(2 hunks).tekton/recert-4-20-pull-request.yaml(1 hunks).tekton/recert-4-20-push.yaml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Red Hat Konflux / recert-4-20-on-pull-request
- GitHub Check: build
| - $(params.additional-labels[*]) | ||
| - com.redhat.component=recert | ||
| - description=recert | ||
| - distribution-scope=public | ||
| - io.k8s.description=recert | ||
| - name=openshift4/recert-rhel9 | ||
| - release=4.20 | ||
| - cpe="cpe:/a:redhat:openshift:4.20::el9" | ||
| - url=https://github.com/rh-ecosystem-edge/recert |
There was a problem hiding this comment.
Remove the quotes from the CPE label value.
Passing cpe="cpe:/a:redhat:openshift:4.20::el9" pushes the literal quotes through to buildah config --label, so the resulting image label becomes "cpe:/a:redhat:openshift:4.20::el9" instead of the bare CPE string Clair expects. Drop the inner quotes so the value is cpe:/a:redhat:openshift:4.20::el9.
🤖 Prompt for AI Agents
In .tekton/build-pipeline.yaml around lines 257 to 264 the CPE label is written
as cpe="cpe:/a:redhat:openshift:4.20::el9" which preserves literal quotes into
buildah config; remove the inner quotes so the label is
cpe:/a:redhat:openshift:4.20::el9 (i.e. change that list entry to the unquoted
CPE string) so the image label contains the bare CPE value Clair expects.
For https://issues.redhat.com/browse/KONFLUX-6210, clair needs access to a name and cpe label that it can use to look up the image in VEX statements.
See also release-engineering/rhtap-ec-policy#149
Based on original changes from @rbean in our other operator repos
Assisted-by: Gemini
Summary by CodeRabbit
New Features
Chores