Windows Command Line to get jenkins verion

20 views
Skip to first unread message

develop...@gmail.com

unread,
Jun 6, 2016, 1:00:28 PM6/6/16
to Jenkins Users
How do you get the current jenkins version from command line windows when running it via "java -jar jenkins.war"?

Thank you!

Daniel Beck

unread,
Jun 6, 2016, 1:16:00 PM6/6/16
to jenkins...@googlegroups.com

> On 06.06.2016, at 19:00, develop...@gmail.com wrote:
>
> How do you get the current jenkins version from command line windows when running it via "java -jar jenkins.war"?

See https://yourjenkins/cli/command/version

develop...@gmail.com

unread,
Jun 6, 2016, 1:21:11 PM6/6/16
to Jenkins Users, m...@beckweb.net
Hi Daniel, i tried that already.

I have a jenkins.war, no jenkins-cli.jar

When i try to do it with the .war i get a java invocation error.

Daniel Beck

unread,
Jun 6, 2016, 1:35:21 PM6/6/16
to jenkins...@googlegroups.com

> On 06.06.2016, at 19:21, develop...@gmail.com wrote:
>
> Hi Daniel, i tried that already.
>
> I have a jenkins.war, no jenkins-cli.jar
>

Oops. My bad.

If you don't want to start Jenkins to see what version jenkins.war is (defining a throwaway JENKINS_HOME), you can just open the war file (zip file format) and look at the contents of the text file META-INF/MANIFEST.MF.

If Jenkins is running, view its index page. It contains the Jenkins version at the bottom right (when viewed), or as 'data-version' attribute on the `body` tag (when parsing the DOM).

Or you can always download the jenkins-cli.jar from your instance, and run it against that instance to determine its version.

Reply all
Reply to author
Forward
0 new messages