Understanding the challenges of plugin version management
The difficult part of upgrading Jenkins is managing the plugin versions. Let's go through a few scenarios to understand why.
Upgrading to the next immediate LTS version of Jenkins
Upgrading Jenkins can be trivially easy – just run a new container with an upgraded version. Container image versions are well defined after all (https://hub.docker.com/r/jenkins/jenkins/tags). This works well when the delta between the old Jenkins version and the new Jenkins version is small. Nearly all plugins installed on one long-term support (LTS) version of Jenkins will be compatible with the next immediate LTS version of Jenkins. This means that starting a new container with an upgraded version of Jenkins using the existing plugins will most likely work:
Once the new version of Jenkins is running, we can...