This document explains what plugin snapshot does and how to configure it.
The plugin snapshot feature helps you manage the dependencies of the plugins you use, eliminating the situation in which Jenkins with a particular configuration would not start, because of issues with transitive dependencies.
The mechanism works similarly to npm’s package-lock.json. It works by creating a full list of dependencies that the Jenkins instance uses in a configMap, and then you’re able to restore from a particular snapshot.
Please note that plugin snapshot feature is unavailable in the free plan of Carthago Operator.
You can configure plugin snapshot using fields in Jenkins Custom Resource Spec:
By default, Operator will create a plugin snapshot every time it detects that the dependencies changed and keep 3 latest revisions of it. With this parameter, you can choose how many previous revisions you want to keep.
To turn this feature off, provide a negative integer in this field.
This field has no effect if pluginSnapshotConfigMapRef is specified.
If you want to keep a particular snapshot that was created, remove the carthago.cloud/plugin-snapshot: managed annotation from the configMap.
When this field is set to true, Jenkins will use plugins from the configMap specified in pluginSnapshotConfigMapRef.
This field specifies, which configMap should be used for plugin snapshot. When this field is specified, but restoreEnabled isn’t set, the plugin snapshot with specified name will be created and overwritten every time a change in plugins is detected.
It is strongly recommended using the same Jenkins image when you restore from a plugin snapshot. Operator will try to start Jenkins and will create a warning if it detects that Jenkins' version has changed.