I would like to call the Jenkins CLI from a Jenkinsfile. I am thinking that I can use the shell directive and call the cli via the client jar. For example
sh 'java -jar /path/to/client.jar...'
What I am unsure about is how to get the client jar. I could do something like a wget to fetch it, but is there a better way?