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.
cheers,
Chris
On 16/05/2013 01:10, Dean Yu wrote:
> Ah. Sounds like you're working with freestyle or matrix jobs. Those need
> to have the "Record fingerprints to track usage" option configured
> explicitly in the projects. It doesn't happen automatically like it does
> for Maven projects.
>
> -- Dean
>
>>>>> -- Dean
>>>>>
>>>>> On 5/14/13 8:18 AM, "Chris Withers"<
ch...@simplistix.co.uk> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I see I can find out the fingerprints created in a build using:
>>>>>>
>>>>>> build.getBuildFingerprints()
>>>>>>
>>>>>> First question: How I can go from a Fingerprint instance (as in the
>>>>>> sequence returned build getBuildFingerprints) to the build instances
>>>>>> referenced by that fingerprint?
>>>>>>
>>>>>> Second question: how can I go in other direction? I have a Build
>>>>>> instance obtained with:
>>>>>>
>>>>>> for (item in Jenkins.instance.items) {
>>>>>> build = build.getLastBuild()
>>>>>> }
>>>>>>
>>>>>> How can I find out what fingerprints were used in this build?
>>>>>> I want to know so I can go and find the job that originated the
>>>>>> fingerprinted artifact and get a list of the SCM changes that
>>>>>> contributed to it.
>>>>>>
>>>>>> Apologies for the clumsiness above, neither Groovy nor Java are my
>>>>>> first
>>>>>> language...
>>>>>>
>>>>>> Chris
>>>>>>
>>>>>> --
>>>>>> Simplistix - Content Management, Batch Processing& Python Consulting
>>>> Simplistix - Content Management, Batch Processing& Python Consulting
>>>> -
http://www.simplistix.co.uk
>>>
>>>
>>
>> --
>> Simplistix - Content Management, Batch Processing& Python Consulting
>> -
http://www.simplistix.co.uk
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit
http://www.symanteccloud.com
> ______________________________________________________________________