The plugin can be installed using the Jenkins Update Center.
Follow along the following steps after running Jenkins to download and install the plugin:
-
Select
Manage Jenkins
-
Select
Manage Plugins
-
Go to
Available
tab. -
Search for
Redis Fingerprint Storage Plugin
and check the box beside it. -
Click on
Install without restart
The plugin should now be installed on your system.
Once the plugin has been installed, you can configure the Redis server details by following the steps below:
-
Select
Manage Jenkins
-
Select
Configure System
-
Scroll to the section
Redis Fingerprint Storage Configuration
and fill in the required details:-
Host
- Enter hostname where Redis is running -
Port
- Specify the port on which Redis is running -
SSL
- Click if SSL is enabled -
Database
- Redis supports integer indexed databases, which can be specified here. -
Connection Timeout
- Set the connection timeout duration in milliseconds. -
Socket Timeout
- Set the socket timeout duration in milliseconds. -
Credentials
- Configure authentication using username and password to the Redis instance.
-
-
Use the
Test Redis Connection
to verify that the details are correct and Jenkins is able to connect to the Redis instance. -
Press the
Save
button. -
Now, all the fingerprints produced by this Jenkins instance should be saved in the configured Redis server!
The plugin can also be configured using the configuration as code plugin
A sample YAML file is provided below for configuring this plugin using JCasC:
unclassified:
fingerprints:
storage:
redis:
host: "localhost"
port: 6379
ssl: false
database: 0
connectionTimeout: 3000
socketTimeout: 3000
credentialsId: "foo"
Support for fingerprint cleanup by external storage plugins was introduced by Jenkins core in Jenkins-2.248. This plugin fully supports fingerprint cleanup. To enable fingerprint cleanup, just uncheck the box next to Disable Fingerprint Cleanup, which can be found in the Fingerprints section.
When fingerprint cleanup is enabled, the plugin periodically clears out the old fingerprints whose builds have been discarded, thus saving memory in the database.
Jenkins-2.251 introduced fingerprint migration. This allows local file system fingerprints to be migrated by the external fingerprint storage plugin. This means that whenever the fingerprint is used, it gets migrated to the newly configured external storage. Redis fingerprint storage plugin completely supports migration.
Clone the repository
git clone https://github.com/jenkinsci/redis-fingerprint-storage-plugin
cd redis-fingerprint-storage-plugin
To obtain the redis-fingerprint-storage.hpi
and redis-fingerprint-storage.jar
files, run:
mvn clean install
They will be available inside ./plugin/target
. (Note that docker is required for running tests. If Docker is not installed, consider skipping tests)
To run the plugin on a local instance, run:
cd plugin
mvn hpi:run
Feel free to reach out to us for any questions, feedback, etc. on the project’s Gitter Channel or the Jenkins Developer Mailing list
We use Jenkins Jira to track issues. Feel free to file issues under redis-fingerprint-storage-plugin
component.