It was my understanding that the job config.xml would show the versions of plugins used during the last run of the job. Am I correct?
Having upgraded all of our plugins, upgraded Jenkins from 2.277.4 to 2.346.2 and upgraded plugins again, the job config.xml files still appear to show the original plugin versions after the jobs have been run. E.g. after a run, SSH Agent plugin v1.22.1 is still showing in the job config.xml, when installed version is 1.834.v622da_57f702c.
Have I missed something major in the upgrade process? Any insight much appreciated.
Thank you!
The plugin version value is written to the configuration file when the job definition is saved. If the job definition has not been saved since the plugin was updated, the job definition will continue to include the original value written to the file before the plugin upgrade.
Jenkins plugins include code that reads older configuration versions. It is generally not required to save the job definition with the new plugin version. New plugin versions continue to read and use old job definitions. If you find a case where that does not happen, it is usually a bug in the plugin.