shipwright-io / cli

A CLI for building container images on Kubernetes!
https://shipwright.io
Apache License 2.0
16 stars 29 forks source link

[FEATURE] Support for parameters, part 1 #224

Closed SaschaSchwarze0 closed 4 weeks ago

SaschaSchwarze0 commented 8 months ago

Is there an existing feature request for this?

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

Build strategies support custom parameters for a long time already. In the meantime = in the Beta API, even the Dockerfile name has become a parameter.

We should finally add support for parameters in the CLI.

As a first step, let's start with single-values.

Describe the solution that you would like.

Here is my suggestion:

shp build create <NAME> --param-value <PARAMETER_NAME>:<PARAMETER_VALUE>

shp build run <NAME> --param-value <PARAMETER_NAME>:<PARAMETER_VALUE>

shp buildrun create <NAME> --param-value <PARAMETER_NAME>:<PARAMETER_VALUE>

NOTE: we do not have a shp build update command. We therefore do not need to think about how to remove a parameter.

TBD: Is the colon (:) a good separator, or should we use the equal sign (=) instead ?

Describe alternatives you have considered.

No response

Anything else?

Once this is done, we should open an issue with part 2 with array support.

qu1queee commented 7 months ago

From refinement, not a release blocker, as CLI will rely on v1alpha1 for v0.13.0. Moving out of the v0.13.0 milestone.

apoorvajagtap commented 5 months ago

/assign @apoorvajagtap