Jenkins: Upgrading
Here are some notes on upgrading Jenkins with a WAR file.
Adapted from here: https://www.baeldung.com/ops/jenkins-war-update
Identify where the current war is running, by opening Jenkins, going to Manage Jenkins, and System Information.
Find the executable-war entry and note the path.
Stop Jenkins: sudo systemctl stop jenkins
Download the latest version of Jenkins as a WAR file:
wget https://updates.jenkins-ci.org/latest/jenkins.war
Or, download a specific version:
wget https://updates.jenkins-ci.org/download/war/2.375.1/jenkins.war
Update the downloaded war file permissions:
chown root:root jenkins.war
chmod 644 jenkins.war
Now, make a backup of the existing war file (at the path from System Information):
mv /usr/share/java/jenkins.war /usr/share/java/jenkins.war.old
Copy the downloaded jenkins war file over the existing executable:
sudo mv /download/jenkins.war /usr/share/java/
NOTE: Be sure to change the folder path of the downloaded file.
You should be able to start the new version with:
sudo systemctl start jenkins
No Comments