Downgrading Jenkins LTS version and plugin versions not working

I am using the Jenkins helm chart to deploy a Jenkins instance inside a Kubernetes cluster. I have an instance at 2.387.2 with some plugins installed. When I try to downgrade the instance, by changing the image tag in the helm chart to jenkins:2.375.3, and providing a list of compatible plugin versions for this LTS version, I notice that the plugins do not get downgraded.

Most of the plugins remain at the same version before the downgrade, and I see many errors in the jenkins-master pod logs and on the UI regarding plugins not loaded. I know I can downgrade the plugins by copying the .hpi file into the /var/jenkins/plugins directory and restart the instance. First question is: why isn’t the downgrade working with the helm chart?

I see there are .pinned and .version_from_image files in the /var/jenkins/plugins directory, but I’m not understanding where these files are coming from, especially since pinned plugins are no longer used in Jenkins versions 2.xxx. I tried deleting these files but this did not help. Second question is: where do these two files come from, and what does the .version_from_image file mean?

Hello @sslk ,

Could this workflow help you?