Skip to content

[FEATURE] shp build upload: pass step resources, or stream into an existing BuildRun #415

Description

@psrvere

Is there an existing feature request for this?

  • I have searched the existing feature requests

Is your feature request related to a problem or use-case? Please describe.

shp build upload creates the BuildRun itself, streams a local directory into it, and exposes a fixed set of BuildRun fields as flags: --sa-name, --param-value, --env, --node-selector, --timeout, the output image settings and retention. There is no flag for step resources, and no way to upload into a BuildRun created some other way. A Build with a Local source can only be started through this command, so a Local-source build cannot request CPU or memory today.

We hit this migrating OpenShift BuildConfigs to Shipwright with the crane plugin. A BuildConfig started with oc start-build --from-dir maps to a Build with a Local source. A BuildConfig with spec.resources maps to a BuildRun with stepResources. Each mapping works on its own. Together they cannot be used. The plugin can write the BuildRun with stepResources, but only shp build upload can feed the Local source, and it always creates its own BuildRun. The plugin now warns that the resources are dropped for such builds.

Describe the solution that you would like.

Either of these closes the gap, and the second covers more:

  1. --step-resources on shp build upload, repeatable, mirroring how --param-value fills spec.paramValues. The value could follow kubectl set resources, for example --step-resources build-and-push=limits.memory=2Gi.
  2. --buildrun-name on shp build upload. Skip creating a BuildRun and stream the directory into the named one, which the user created with whatever fields they need. The waiter container and the streaming protocol stay the same; only the creation step is skipped.

The second option also serves anyone who needs a BuildRun field the CLI does not expose, without a new flag per field.

Describe alternatives you have considered.

  • Setting resources on the Build. The Build API has no resources field; only the BuildRun does.
  • Creating the BuildRun from our template first, then running shp build upload. The command creates a second BuildRun and streams into that one. The first waits for its Local source until spec.source.local.timeout and fails.
  • Driving the waiter container by hand with kubectl cp and removing the lock file. It works, and it depends on an internal protocol nobody should script against.

Anything else?

  • The plugin is migtools/crane-plugin-buildconfig-to-builds. The plugin-side warning is tracked as BUILD-2477 in Red Hat's Jira.
  • shp built from main on 2026-09-16. shp build upload --help lists the flags above and no resources flag.
  • Command docs: docs/shp_build_upload.md in this repository.

Co-Authored-By: Claude

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions