Hi I have written a shellscript which accepts the "jenkins job name" and starts triggering that build via command line , In my Jenkins server I have different jobs which differs in count and names of parameters.
$build_name= Jenkins_job_name ##(which is the only input)
java -jar jenkins-cli.jar -s http://mydomain:8080/ build $build_name -s -p PARA1=$paravalue
will work only if i am giving the exact name and count of the parameter which the job expects
I want to generalize this build triggering script, which fetches the names of parameter for a specific job,accepts it and then triggers the build
NB: When I try the above script with different parameter name ("KEY1" instead of "PARA1"), I am getting the message like:
'KEY1' is not a valid parameter. Did you mean "PARA1"?