Updating Jenkins Version via BashScript

If you want to update your Jenkins to the desired version, then following script will help you to install the desired version of Jenkins by restarting it to the actual updated versions.

Create the scripting file using

nano updateJenkins.sh

Grant execute permissions to the file.

chmod +x updateJenkins.sh

Add the following content into your script.

#/bin/bash

echo "Enter the Jenkins Version you want to update:"
read version
wget http://updates.jenkins-ci.org/download/war/$version/jenkins.war
sudo cp jenkins.war /usr/share/jenkins/
sudo service jenkins restart
rm jenkins.war

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s