Redis Fingerprint Storage

Version: 1.0-rc-3Minimum Jenkins requirement: 2.248ID: redis-fingerprint-storage
Installs: 4
Last released:
Maintainers
Sumit Sarin

Build GitHub release Language grade: Java Contributors Gitter

logo

Introduction

The plugin allows users to configure Redis for storing fingerprints.

Installation

The plugin can be installed using the Jenkins Update Center.

Follow along the following steps after running Jenkins to download and install the plugin:

  1. Select Manage Jenkins

  2. Select Manage Plugins

  3. Go to Available tab.

  4. Search for Redis Fingerprint Storage Plugin and check the box beside it.

  5. Click on Install without restart

The plugin should now be installed on your system.

Configuring the plugin

Using the Web UI

Once the plugin has been installed, you can configure the Redis server details by following the steps below:

  1. Select Manage Jenkins

  2. Select Configure System

  3. Scroll to the section Redis Fingerprint Storage Configuration and fill in the required details:

    config page
    • 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.

  4. Use the Test Redis Connection to verify that the details are correct and Jenkins is able to connect to the Redis instance.

  5. Press the Save button.

  6. Now, all the fingerprints produced by this Jenkins instance should be saved in the configured Redis server!

Using Jenkins Configuration as Code Plugin (JCasC)

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"

Supported Features

Fingerprint Cleanup

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.

Fingerprint Migration

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.

Setting up the Plugin locally for Development

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

Reaching Out

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.

ArchivesGet past versions
Links
Labels