jenkinshudson

How to update Jenkins/Hudson through CLI


I have a hudson installed in server's /var/lib/hudson directory. when I access jenkins through URL in my browser,, I see the version 1.411 in the bottom of the page.

Does anybody know how to update Jenkins through command line (CLI). if its possible.

When I go to Manage Jenkins page , it says something like : "New version of Jenkins (1.521) is available for download (changelog)."

I dont feel safe with downloading the new jar and extract that in the server.


Solution

  • Are you referring to the Jenkins CLI, or the CLI on your operating system ? There is no way to update the Jenkins version via the Jenkins CLI.

    If you installed Jenkins as a standalone WAR file, all you need to do to upgrade it from the command line is to download the new Jenkins WAR file and replace your current WAR file, then restart Jenkins. It's always a good idea to back up the full contents of your $JENKINS_HOME directory before upgrading.

    If you used a native package such as an RPM or DEB, you should use the package manager on your Jenkins server (yum, apt-get etc.) to upgrade Jenkins.