My goal is to ask questions of the Jenkins server within a Jenkins-run script (specifically when it's run on a remote agent). I'd like to use a Perl or Python script with the REST API. I'd like to ask data known by the Jenkins server.
In my specific case, I'd like a build-display-name of a most-recent successful build of a different project. I'd like to do this without username/password credentials. I'd expect to be able to use the environment variable JENKINS_SERVER_COOKIE
as a credential as a cookie or header as I use the Jenkins REST API for GET-based requests.
Is that possible? If not, what is the environment variable JENKINS_SERVER_COOKIE
used for?
Thanks!
JENKINS_SERVER_COOKIE
is not used for anything related to the REST API; best to ignore it.
What you request is not currently possible.
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