Created
May 2, 2024 13:47
-
-
Save yazanmonshed/6097d2b55e25be72720222beb28893df to your computer and use it in GitHub Desktop.
Upgrade Jenkins to latest version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## upgrade Jenkins steps | |
# Stop running Jenkins service | |
systemctl stop jenkins.service | |
# Take Jenkins instance Backup as a recovery option | |
cd /var/lib | |
tar -cvzf jenkins_backup.tar.gz jenkins/ | |
mv jenkins_date.tar.gz $HOME | |
# Take The Backup Of the Current Jenkins Version Binary | |
## find the Binary file | |
sudo find / -name jenkins.war | |
cd /usr/share/java/jenkins.war | |
mv jenkins.war jenkins.war.old | |
# Download The New LTS Jenkins Version | |
wget https://updates.jenkins-ci.org/latest/jenkins.war | |
# start the jenkins service | |
systemctl start jenkins.service | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment