Jenkins upgrade to latest version running on docker

Hi All,

Jenkins is running on docker container and the current version is 2.137.
We have created same replica of container in test environment and tried to upgrade to latest (2.319) version but we couldn’t do that, getting many errors. In second attempt we tried to upgrade Jenkins plugins first but unfortunately plugins upgrade taking very long time (around 6 to 7 hours and at the end getting error means upgrade not getting successful.
Did anyone face this issue? Please share the solution for this on how to upgrade Jenkins and its plugins without any issues and within less time.

Thanks in advance.

Best Regards,
Srinivas

If your docker container is as old as 2.137, that indicates you do not upgrade very often. If you do not upgrade very often, you should probably upgrade to a Jenkins long term support release (like 2.303.3), rather than upgrading to a Jenkins weekly.

Upgrading Jenkins and its plugins with fewer issues and less time is usually done by performing upgrades every time they are available, rather than waiting 2+ years between upgrades.

You may want to create a new Docker image based on the most recent Jenkins LTS and the latest releases of the plugins that you use. You would copy your job definitions from the existing container into the new image and diagnose container failures.

Be sure that you read the Jenkins upgrade guide for Jenkins 2.277.1. It alerts you to significant changes that were made in Jenkins at that time and it may alert you to plugins that you should remove.