Upgrading Jenkins On Azure

On July 18 2018, it was announced that Jenkins had a major security flaw in the system, prompting an immediate fix and deploy.  When I set up the Jenkins instance for Azure, I used the Azure Marketplace to do so, handling most of the legwork in getting everything set up.  A quick Google search hadn’t brought up an easy way to do this – so I took a good half of a day to figure out the process of upgrading Jenkins on Azure.

This guide will help you upgrade Jenkins on Azure, assuming you’ve used the Jenkins Azure Marketplace to create the Jenkins instance.  This assumes you’ve already created a Jenkins virtual machine on Azure.  In addition, the initial set up should be complete.   If not, you can check out some more information within the Microsoft documentation.

SSH into the Virtual Machine

If you’ve been using this instance, you should be familiar with SSH forwarding and being able to access Jenkins using localhost.  If this is new, you can read this Jenkins article on the security setup for the Azure Jenkins Marketplace instance.

Use this command in a command line interface to log in to your virtual machine:

Replace the following:

  • Username – the server admin username created when creating the Azure VM.
  • Domain Name – the domain name to access the virtual machine.

You’ll be asked for a password – use the password provided alongside the username when creating the virtual machine.

After logging in you’ll see a screen like below.  This verifies you are connected to the virtual machine.

logged into the virtual machine

Access http://localhost:8080 and verify you can access the Jenkins interface:

Jenkins interface via localhost

Download Newest JAR

After logging into the server, you’ll use the following command to download the latest version of Jenkins:

Assuming all is successful, you should see the following

Downloaded newest Jenkins JAR

After downloading the .war file, copy it to the Jenkins directory:

(if you need to know the location of the WAR file on the server, you can check it in Manage Jenkins -> System Information)

And finally, with the new .war in place, restart Jenkins:

Verification of the installation is simple. Access Jenkins and check the bottom right to see the updated version number:

Checked for latest Jenkins installation


Upgrade Jenkins server to a new version


Leave a Reply

Your email address will not be published. Required fields are marked *