On 5/16/13 1:29 AM, "Chris Withers" <[email protected]> wrote:

>On 16/05/2013 09:19, Chris Withers wrote:
>> Nope, don't think that's it...
>>
>> Taking one matrix job as an example, I have "Record fingerprints to
>> track usage" turned on, but if I do
>> job.getLastBuild().getBuildFingerprints() on that job, I get [].
>>
>> However, if I do the following on the job that created the artifacts
>> used by the matrix build:
>>
>> build = job.getLastBuild()
>> for (fp in build.getFingerPrints()) {
>> println fg.getUsages();
>> }
>>
>> ...I do see the matrix children that used the artifact.

I suspect that you are doing getFingerprints on the matrix parent job. If
you did it on the children, you might see something come back from
getUsages.

>
>Sorry, to be clear, I'm still looking for a way to get the fingerprint
>objects for the artifacts *used* by a job, rather than those produced by
>it.
>
>build.getFingerPrints() only appears to provide the latter.
>
>What am I missing?

I don't think you're missing anything. Fingerprint.getOriginal() gives you
the build that produced the artifact[1], and Fingerprint.getUsages() gives
you the builds that consume it.

  -- Dean

[1] Technically, getOriginal() is the first build that generated that
artifact checksum, whether or not it's really the producer.


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to