When you have interdependent projects on Jenkins, it often becomes hard to keep track of which version of this is used by which version of that. Jenkins supports "file fingerprinting" to simplify this.
For example, suppose you have the TOP project that depends on the MIDDLE project, which in turn depends on the BOTTOM project. You are working on the BOTTOM project. The TOP team reported that bottom.jar that they are using causes an NPE, which you (a member of the BOTTOM team) thought you fixed in BOTTOM #32. Jenkins can tell you which MIDDLE builds and TOP builds are using (or not using) your bottom.jar #32.
To make this work, all the relevant projects need to be configured to record fingerprints of the jar files (in this case, bottom.jar.)
For example, if you just want to track which BOTTOM builds are used by which TOP builds, configure TOP and BOTTOM to record bottom.jar. If you also want to know which MIDDLE builds are using which bottom.jar, also configure MIDDLE.
Since recording fingerprints is a cheap operation, the simplest thing to do is just blindly record all fingerprints of the followings:
The disk usage is affected more by the number of files fingerprinted, as opposed to the size of files or the number of builds they are used. So unless you have a plenty of disk space, you don't want to fingerprint **/*.
To set-up file fingerprinting, go to your project and click "configure" in the left navigation bar. Click on the button to add a post-build action. From the list that appears, select "Record fingerprints of files to track usage". The post-build action configuration fields provide you with a pattern option to match the files you want to fingerprint as well as a couple check-box selections to do your file fingerprinting.
Maven job type does this automatically for its dependencies and artifacts.
The fingerprint of a file is simply a MD5 checksum. Jenkins maintains a database of md5sum, and for each md5sum, Jenkins records which builds of which projects used. This database is updated every time a build runs and files are fingerprinted.
To avoid the excessive disk usage, Jenkins does not store the actual file. Instead, it just stores md5sum and their usages. These files can be seen in $JENKINS_HOME/fingerprints.
Plugins can store additional information to these records. For example, Deployment Notification Plugin tracks files deployed on servers via chef/puppet through fingerprints.
Here is a few typical scenarios that benefit from this feature:
You develop the BOTTOM project and you want to know who is using BOTTOM #13 in which builds
You develop the TOP project and you want to know which build of bottom.jar and middle.jar you are using in TOP #10.
You have the TOP project that builds a jar. You also have the TOP-TEST project that runs after the TOP project and does extensive integration tests on the latest TOP bits. You want to know the test results of TOP #7.
Skip to end of metadata Go to start of metadata