jenkins, what does fingerprint artifacts means?

半世苍凉 提交于 2019-12-08 14:58:19

问题


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?


回答1:


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




回答2:


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


来源:https://stackoverflow.com/questions/30985299/jenkins-what-does-fingerprint-artifacts-means

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!