I am writing a couple Linux shell scripts that move some code around and it would be nice and simple if these could be interactive.
The drawback is I would like to execute some of these scripts in Jenkins and am not entirely sure of how Jenkins handles user prompts within the script. I haven't been able to find much of anything on this and don't have the resources to just go ahead and test it, so any advice would be appreciated.
Thanks guys
If a command that Jenkins executes expects input, it will just sit there and wait for the input. The job will hang and you'll need to kill it manually. One way of coping with this is to pipe the expected input into the command, e.g.
echo "input" | command
or
command < file_with_input
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With