0 votes
ago in Technology by (321k points)
How to get the Jenkins version programmatically in Jobs/Pipelines or nodes other than master?

1 Answer

0 votes
ago by (321k points)

To check the version of Jenkins, load the top-level page or any top-level Remote Access API path like the '.../api/*' page and then check for the 'X-Jenkins' response header.

This contains the version number of Jenkins, like "1.404". This is also a good way to check if an URL is a Jenkins URL.