Windows

Before you upgrade

  1. Ensure you have created a backup.

  2. Verify all running builds are complete.

  3. Ensure that a supported Java version is installed on the controller and all agents. For more information, refer to the upgrade guide.

Upgrade steps on Windows

There are two ways to upgrade Jenkins in Windows:

  • Windows MSI installer

  • Replacing the WAR File.

When upgrading Jenkins, you should follow the steps for the installation method used to install Jenkins originally.

Upgrading via MSI Installer

You can download the latest LTS or Weekly MSI Installer to upgrade Jenkins.

Just download the Jenkins MSI Installer from here and install the latest Jenkins LTS or Weekly. For more information refer to the Installing Jenkins On Windows via MSI Installer page.

Replacing the WAR File

  1. Stop the running Jenkins service

    To stop Jenkins use the following command to stop server

    http://[jenkins-server]/exit

    For example, if my local PC is running Jenkins at port 8080, it will be

    http://localhost:8080/exit
  2. Go to the location where your Jenkins instance is installed

    By default, Jenkins is installed here: C:\Program Files\Jenkins.

  3. Rename the war folder to war.old This is important if the upgrade process fails because you won’t lose the backup of your Jenkins instance.

  4. Rename jenkins.war file to jenkins.war.old

    Don’t Replace and Don’t Delete the old war file.
  5. Copy the new jenkins.war you downloaded into your Jenkins installation directory

    This is the upgraded jenkins.war which will update your Jenkins Instance

  6. Start Jenkins

    To start the service, you need to open the terminal in the directory where your Java WAR File is present and run the following command:

    java -jar jenkins.war

    Observe the creation of a new war directory which will now contain the contents of the new jenkins.war archive. By doing so, you can avoid losing your setup and builds that happen when a WAR file is replaced.

How to safely upgrade to a new version



Post-update setup wizard

There are a few post upgrade steps to perform.

Verify the version update

The Jenkins server is up and running. Let’s now verify the version from the Jenkins dashboard:

Checking Version of Updated Jenkins Instance

The upgraded Jenkins version can be seen in the bottom right corner of the Jenkins UI.

Upgrading Jenkins Java Version From 8 to 11

Jenkins updates its minimum Java requirement every two years. The Java support policy provides more details. Java 17 is also supported as of the 2.361.1 Long Term Support release. Therefore, a best practice is to verify your Java version if you are upgrading from an older version. To upgrade Jenkins from Java 8 to Java 11, refer to the Upgrade Java Guideline and Java requirements.



Compatibility with the new version

Plugins are one of the most crucial parts of the Jenkins pipeline. In fact, each job uses a plugin for its execution. Check the available updates for installed plugins:

  1. Go to the Jenkins dashboard.

  2. Select Manage Jenkins in the navigation pane on the left side of the Jenkins dashboard.

  3. Select Manage Plugins.

Jenkins plugin manager to check compatibility

The above image shows that there is no need to update any plugins.

Sometimes a Jenkins plugin changes the data that it is storing. In other cases, a plugin that has been uninstalled may have left data in the system that Jenkins no longer needs. The "Manage old data" page allows administrators to remove those unused items.

  1. Go to the Jenkins dashboard

  2. Select Manage Jenkins in the navigation pane, on the left side of the Jenkins dashboard.

Jenkins plugin manager to check compatibility

The above image shows that our new version isn’t compatible with the old version. However, we can fix the problem by selecting the Manage option.



Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.