Last active
September 24, 2018 06:07
-
-
Save flyudvik/3e3777faaee3142686134812deb76c27 to your computer and use it in GitHub Desktop.
Update jenkins through jenkins.war file. Usage: update_jenkins.sh http://updates.jenkins-ci.org/download/war/2.107.2/jenkins.war
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
#!/usr/bin/env bash | |
echo "Backing up the jenkins.war" | |
sudo cp /usr/share/jenkins/jenkins.war /usr/share/jenkins/jenkins.war.backup_$(date +'%m_%dT%H_%M_%S') | |
echo !! | |
echo "Downloading the new version" | |
sudo wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war -O /usr/share/jenkins/jenkins.war | |
sudo systemctl stop jenkins | |
sudo systemctl start jenkins | |
echo "Reload completed. Checking status" | |
sudo systemctl status jenkins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment