fix(ci): wire hp-fleet-gitops auth for Konflux deploy-tag#778
Conversation
hp-fleet-gitops is private under openshift-online; Konflux credentials only cover kartograph. Treat deploy-tag finally failures as warnings so successful image builds are not marked failed. Also fix agent-runtime configmap sed producing a double quote. Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughSummary by CodeRabbit
WalkthroughFour Tekton PipelineRun YAML files (kartograph-agent-runtime, kartograph-api, kartograph-dev-ui, kartograph-openshell-gateway) modify the embedded shell script in the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes CWE-78 (OS Command Injection) surface — CI/CD supply chain note: The The 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 @.tekton/kartograph-agent-runtime-push.yaml:
- Around line 710-714: The git push command in the branch push failure handler
exits with code 0 when the push fails, which masks the failure and allows the
pipeline to succeed incorrectly. Change the exit 0 statement to exit 1 in the
conditional block following the git push origin "$BRANCH" command so that push
failures properly fail the pipeline and trigger alerting, instead of silently
continuing with a success status.
- Around line 675-680: The git clone command for the hp-fleet-gitops repository
is currently exiting with status code 0 when it fails, which silently masks
credential, access, or network failures and allows the pipeline to succeed
despite the critical deploy-tag automation being skipped. Change the exit 0
statement in the clone failure handler (in the condition checking the git clone
result) to exit with a non-zero status code like exit 1 to properly signal
pipeline failure when git clone fails, ensuring that credential revocation, repo
access changes, or infrastructure issues are not silently masked.
🪄 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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 7c0b75e4-15d9-4c4e-968a-8168d6a8fc91
📒 Files selected for processing (4)
.tekton/kartograph-agent-runtime-push.yaml.tekton/kartograph-api-push.yaml.tekton/kartograph-dev-ui-push.yaml.tekton/kartograph-openshell-gateway-push.yaml
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual)openshift-hyperfleet/hyperfleet-broker(manual)
Use a dedicated kartograph-hp-fleet-gitops-auth secret for the finally task instead of PAC's kartograph-scoped git_auth_secret. Revert soft-fail workaround; fail clearly when the secret is missing. Keep agent-runtime configmap sed fix. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Summary
PAC
git_auth_secretonly coversopenshift-hyperfleet/kartograph. Theupdate-deploy-tagfinally task clones privateopenshift-online/hp-fleet-gitops, which causedRepository not found.This PR wires a dedicated secret for that repo and reverts the soft-fail workaround.
Also fixes agent-runtime
configmap-patch.yamlsed double-quote bug.Setup (required before merge)
Create a GitHub PAT (classic or fine-grained) with Contents: Read/Write and Pull requests: Write on
openshift-online/hp-fleet-gitops.In Konflux tenant namespace, apply the secret (replace PAT placeholders):
oc project kartograph-tenant cp .tekton/kartograph-hp-fleet-gitops-auth.secret.example.yaml /tmp/kartograph-hp-fleet-gitops-auth.secret.yaml # edit /tmp/...yaml — replace REPLACE_WITH_GITHUB_PAT (both places) oc apply -f /tmp/kartograph-hp-fleet-gitops-auth.secret.yaml rm /tmp/kartograph-hp-fleet-gitops-auth.secret.yamlSuccessful runs should open deploy-tag PRs in hp-fleet-gitops automatically.
Test plan
kartograph-hp-fleet-gitops-authexists inkartograph-tenant