Skip to content

[BUILD-1641] feat: map SourceStrategy Scripts to S2I scripts-url param - #150

Open
psrvere wants to merge 2 commits into
migtools:mainfrom
psrvere:BUILD-1641-custom-scripts-s2i
Open

[BUILD-1641] feat: map SourceStrategy Scripts to S2I scripts-url param#150
psrvere wants to merge 2 commits into
migtools:mainfrom
psrvere:BUILD-1641-custom-scripts-s2i

Conversation

@psrvere

@psrvere psrvere commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Maps BuildConfig sourceStrategy.scripts to the Shipwright S2I scripts-url build parameter during conversion
  • Adds S2iScriptsURLParamName = "scripts-url" exported constant and processSourceStrategyScripts() (replaces the previous unsupported-field warning)
  • Removes the now-dead CustomScriptsRFE constant

Test plan

  • GOWORK=off go test ./convert/...: 87/87 PASS (post-rebase onto latest main)
  • TestProcessSourceStrategyScripts: table-driven — URL set → param added; empty → no param emitted
  • Full results: designs/test-results/BUILD-1641-results.md

Dependencies

Operator PR must merge first (defines the scripts-url strategy param): operator PR: redhat-openshift-builds/operator#1390

Related

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Build conversion now supports custom Source-to-Image script URLs.
    • Custom script URLs are preserved as build parameters during conversion.
  • Bug Fixes

    • Source strategies with configured scripts are no longer ignored during BuildConfig conversion.
  • Tests

    • Added coverage for configured and empty script URL scenarios.

psrvere and others added 2 commits July 28, 2026 10:09
…1641)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ad code after custom-scripts support landed)
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

BuildConfig conversion now maps non-empty S2I source strategy scripts URLs to a scripts-url build parameter. Tests cover populated and empty values, and the obsolete custom scripts RFE constant is removed.

Changes

S2I scripts URL conversion

Layer / File(s) Summary
Source strategy parameter mapping and validation
convert/buildconfigs.go, convert/rfe.go, convert/buildconfigs_test.go
The converter adds the scripts-url parameter, maps non-empty SourceStrategy.Scripts values into generated builds, removes the obsolete RFE constant, and tests populated and empty script URLs.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: mapping SourceStrategy Scripts to the S2I scripts-url parameter.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant