I don't follow...

If I have a build (ie: AbstractBuild as far as interface goes), how do I get the Fingerprint object for the fingerprints consumed by that build?

build.getBuildFingerprints() appears to only returns fingerprints for artifacts created by that build, rather than those consumed by it.

Chris

On 15/05/2013 01:45, Dean Yu wrote:
Same way. The Fingerprint class gives you both the originator and the
consumers of the artifact represented by that fingerprint.

   -- Dean

On 5/14/13 11:14 AM, "Chris Withers"<[email protected]>  wrote:

Hi Dean,

Thanks, but if I have a build that only used artifacts rather than
generating them, how do I get the fingerprints of those artifacts
starting from a build object?

cheers,

Chris

On 14/05/2013 16:56, Dean Yu wrote:
Hi Chris,
    From a Fingerprint instance, you can call getOriginal() to get a
Fingerprint.BuildPtr object that refers to the source of fingerprint.
(Or
null if the fingerprint was generated outside of Jenkins.) You can also
call getJobs() on a Fingerprint object to get a list of job names that
consume the artifact that was produced by the source job.

    -- Dean

On 5/14/13 8:18 AM, "Chris Withers"<[email protected]>  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
              - http://www.simplistix.co.uk

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





--
Simplistix - Content Management, Batch Processing&  Python Consulting
            - http://www.simplistix.co.uk



--
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk

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