jenkinsci / jenkinsfile-runner

A command line tool to run Jenkinsfile as a function
MIT License
1.13k stars 291 forks source link

Is there a way to use inputs #665

Open aphsa opened 1 year ago

aphsa commented 1 year ago

What feature do you want to see added?

I tried to send the inputs as Parameters they don't work.

docker run --rm -v /home/aphsa/code/jenkins/testjenkinsfile/Jenkinsfile4:/workspace/Jenkinsfile jenkins/jenkinsfile-runner -a "Username=Alpha" -a "Password=beta"
[Pipeline] stage
[Pipeline] { (Prompt for input)
[Pipeline] script
[Pipeline] {
2022-11-17 16:29:55.977+0000 [id=50]    WARNING hudson.model.ParametersAction#filter: Skipped parameter `Username` as it is undefined on `job`. Set `-Dhudson.model.ParametersAction.keepUndefinedParameters=true` to allow undefined parameters to be injected as environment variables or `-Dhudson.model.ParametersAction.safeParameters=[comma-separated list]` to whitelist specific parameter names, even though it represents a security breach or `-Dhudson.model.ParametersAction.keepUndefinedParameters=false` to no longer show this message.
2022-11-17 16:29:55.977+0000 [id=50]    WARNING hudson.model.ParametersAction#filter: Skipped parameter `Password` as it is undefined on `job`. Set `-Dhudson.model.ParametersAction.keepUndefinedParameters=true` to allow undefined parameters to be injected as environment variables or `-Dhudson.model.ParametersAction.safeParameters=[comma-separated list]` to whitelist specific parameter names, even though it represents a security breach or `-Dhudson.model.ParametersAction.keepUndefinedParameters=false` to no longer show this message.
[Pipeline] input
Input requested

Upstream changes

No response

oleg-nenashev commented 1 year ago

No way at the moment, no ETA but all contributions are always welcome. It is possible to implement it, I believe