[BUILD-1756] feat: support pushing output images to OpenShift imagestreams - #144
Conversation
The warning claimed ImageStream push was unsupported in Shipwright, but it works when the BuildRun uses a ServiceAccount with internal registry push access (e.g., the 'pipeline' SA managed by OpenShift Pipelines). Replace the warning with info logs that explain the converted URL and the SA requirement when no explicit pushSecret is configured. Resolves: BUILD-1756 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…essage - Add tests for ImageStreamTag output URL construction (with/without pushSecret) - Change guidance log from Infof to Warnf (advises user action needed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Prateek Singh Rathore <prateek.singh.rathore@gmail.com>
- Rename duplicate test "ImageStreamTag output without pushSecret" to avoid confusion - Default to :latest when ImageStreamTag name has no colon (matches OpenShift behavior) - Add test for cross-namespace ImageStreamTag reference - Add test for ImageStreamTag name without tag Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughImageStreamTag output conversion now defaults missing tags to ChangesImageStreamTag output conversion
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
🧹 Nitpick comments (1)
convert/buildconfigs_test.go (1)
390-391: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRename test case to avoid a duplicate name.
There is already an existing test case at line 307 named
"ImageStreamTag output with pushSecret". To distinguish this test and more accurately reflect its specific scenario, consider appending- custom namespaceto the name, similar to the preceding test case.♻️ Proposed refactor
{ - name: "ImageStreamTag output with pushSecret", + name: "ImageStreamTag output with pushSecret - custom namespace",🤖 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 `@convert/buildconfigs_test.go` around lines 390 - 391, Rename the duplicate test case in the test table to distinguish its custom-namespace scenario, appending “- custom namespace” to the existing “ImageStreamTag output with pushSecret” name while leaving the test logic unchanged.
🤖 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.
Nitpick comments:
In `@convert/buildconfigs_test.go`:
- Around line 390-391: Rename the duplicate test case in the test table to
distinguish its custom-namespace scenario, appending “- custom namespace” to the
existing “ImageStreamTag output with pushSecret” name while leaving the test
logic unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c2e128de-5945-45d7-b16b-1f079fd3cfa3
📒 Files selected for processing (3)
convert/buildconfigs.goconvert/buildconfigs_test.goconvert/rfe.go
💤 Files with no reviewable changes (1)
- convert/rfe.go
Summary
image-registry.openshift-image-registry.svc:5000/<namespace>/<name>:<tag>) instead of warning "not supported":latesttag when ImageStreamTag name has no colon (matches OpenShift behavior)ImageStreamsPushRFEconstant fromrfe.go(feature now implemented)Test plan
Related
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
latesttag when no tag is provided.Bug Fixes