Fingerprints for files with same checksum in API

15 views
Skip to first unread message

Tammy Osborn

unread,
Aug 4, 2017, 4:13:24 PM8/4/17
to Jenkins Users
I'm using the REST API to get fingerprints for a build's artifacts. It seems that when there are files with the same checksum, only one of the files is shown in the fingerprint array. I need a way to to find the fingerprint for the other files as well.

Example: FileA and FileB have same content and same checksum. FileA is in the API fingerprint array but FileB is not.

When I view FileB details from the Jenkins artifacts page, it shows FileA and its fingerprint. So somewhere, there must be a link between FileB and FileA. Where can I find that relationship?

Tammy Osborn

unread,
Aug 5, 2017, 1:47:10 PM8/5/17
to Jenkins Users
More info..
When I click on view fingerprints in the build, it takes me to https://jenkinshost/job/webapps/view/myview/job/IRAD-CoreBuild/1/fingerprints/
FileB is listed there
Then when I click on "More details" link it takes me to https://jenkinshost/fingerprint/2e24226ea848c9bbb946e50740a4dbeb/ which is the fingerprint for FileA. 

How can I get to the API for the first url above which I hope will give me the link between FileB and FileA? Adding "api/json" to the end of the url results in "Not Found" (http 404)
.

Tammy Osborn

unread,
Aug 7, 2017, 4:05:01 PM8/7/17
to Jenkins Users
I'm still trying to figure out the best way to handle this scenario. Possibly I am trying to use fingerprints in a way they are not intended to be used.

Here's a new example using the same FileA and FileB from earlier examples. The 2 files have the same checksum and are in the same job. 
I call https://jenkinshost/fingerprint/49a681ceb33c90077fd3f49912c933ca/api/json and get fileName which is FileA. But I'm using the checksum from FileB. 

Should I just make sure the checksum is valid for the job and not worry about the filename differences?

I really would appreciate input from anyone who is using Jenkins fingerprints to validate copy of artifacts. 


On Friday, August 4, 2017 at 1:13:24 PM UTC-7, Tammy Osborn wrote:
Reply all
Reply to author
Forward
0 new messages