Best Jenkins Upgrade Path


I’m trying to figure out what the best method to upgrade Jenkins would be. We’re on version 2.251, and apparently someone was tasked to upgrade it a year ago, and when they did, it completely broke the ability to login to the website (something to do with authentication). I’m guessing plugins needed to be updated first.

However, now looking at the plugin manager, we have quite a few that say errors like:

Warning: This plugin is built for Jenkins 2.332.4 or newer. Jenkins will refuse to load this plugin if installed.
Warning: This plugin has dependencies on other plugins that require Jenkins 2.332.4 or newer. Jenkins will refuse to load the dependencies requiring a newer version of Jenkins, and in turn loading this plugin will fail.

So, if we upgrade plugins, it’s possible Jenkins may not start, or we won’t be able to login (we use Active Directory to login). If we upgrade Jenkins without upgrading plugins, there is no way to login.

Is the next best method to set up a master/slave node configuration, and then move the slave to be a master?

Depends greatly on your definition of best.

Most reliable:

  • Upgrade all the plugins you can
  • Upgrade to next jenkins stable release
  • follow Jenkins LTS Upgrade Guide
  • Upgrade all plugins you can
  • Repeat until you are at the most recent version

Easiest Shortest:

  • YOLO
  • Make a backup of your config.
  • Install latest into a new directory/server/etc
  • Copy jobs from old one
  • Startup jenkins
  • Install all the plugins you used to have.

There’s no quick and easy and reliable way to upgrade 251->387 which is about 136 weeks, so 2.5 years of changes.

1 Like

Important Notes

  • you’ll have to upgrade jdk to 11 or 17 for a bunch of the more recent versions.
  • A bunch of really old plugins got removed - Deprecating non-Java plugins - so probably good to remove them before trying anything else.
1 Like

This is helpful! Thank you, halkeye.