Common location of jenkins war file on ubuntu server is:
cd /usr/share/jenkins/
Stop the jenkins server
$ sudo service jenkins stop
Move existing jenkins war file
$ sudo mv jenkins.war jenkins.war.old
Download latest/specific jenkins war file
$ sudo wget https://updates.jenkins-ci.org/latest/jenkins.war # For latest
$ sudo wget https://updates.jenkins-ci.org/download/war/2.222.4/jenkins.war # for 2.222.4
Start the Jenkins server
$ sudo service jenkins start
Comments