jenkins, what does fingerprint artifacts means?
Asked Answered
L

2

22

My understanding

As far as I understood artifacts up to now, is that it was used to know if my project refers to an unfinished build task's artifacts.

Problem

I tried reading more (on jenkins site too) but I'm not sure I understand so easily what they do now. I know that when I promote a build, I can fingerprint artifacts. What does it mean then?

Lunula answered 22/6, 2015 at 16:36 Comment(0)
S
26
  • Artifacts - anything produced during the build process.
  • Fingerprinting artifacts - recording the MD5 checksum of selected artifacts.

You can then use the MD5 checksum to track a particular artifact back to the build it came from.

Selry answered 22/6, 2015 at 16:40 Comment(2)
Thanks!! Now I get the difference I think. With the artifacts, I'd got no way to track where they came from?Lunula
Not unless you have a very well defined naming convention.Selry
P
14

Adding to @Slav answer, Fingerprinting help Jenkins in keeping track of which version of a file is used by which version of a dependency.

Quoting an example and how it works from Jenkins Page:

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 Null Pointer Exception, 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.

How does it work?

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
Propel answered 9/3, 2017 at 12:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.