PREQ-7525: Accept plain-text success from multiRepoPromote - #330
Conversation
The plugin returns "Promoted …" on HTTP 200, not JSON. 1.8.6 treated that as failure and broke multi-repo promote consumers.
Code Review ✅ ApprovedUpdates OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
Adjusts the Artifactory multi-repo promotion step to tolerate the multiRepoPromote plugin’s real-world success output (plain-text Promoted ...) while preserving failure detection via JSON errors, addressing a regression introduced in 1.8.6.
Changes:
- Update
promote_multi()to treat plain-text responses starting withPromotedas success. - Keep failing behavior for JSON responses that contain non-empty
.errors, and for unexpected non-JSON bodies. - Update/extend ShellSpec coverage to reflect plain-text success responses from
multiRepoPromote.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
promote/promote.sh |
Accepts Promoted ... plain-text as success while retaining JSON errors handling and robust error reporting for unexpected bodies. |
spec/promote_spec.sh |
Updates mocks/expectations for plain-text success and adds a dedicated test case for the Promoted ... response. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|



Summary
promote_multi()required a JSON object response, butmultiRepoPromote.groovyreturns plain text on success (Promoted <build> <number> from …).Unexpected non-JSON response.Promotedas success; still fail on JSONerrorsand other non-JSON bodies (e.g.Bad Gateway).Test plan
shellspec spec/promote_spec.sh --shell bash(35 examples, 0 failures)shellcheck promote/promote.sh1.8.7+v1update, re-run multi-repo promote (e.g. sonarqube-unification)