Nicely done!!  How the heck was I supposed to know that!?  :-(  The API is
less than intuitive and does not seem to be well documented.  Any advice on
how to best use it?

Thanks again!!

On Wed, Dec 9, 2015 at 7:28 PM, Christopher Orr <[email protected]> wrote:

> Hi there,
>
> On 09/12/15 23:40, Guy Matz wrote:
> > Hi!  Anyone know how I can retrieve the git revision from a job?
> >
> > I can get to the build:
> >
> > j = Jenkins.instance.getJob('render-master')
> > b475 = j.getBuildByNumber(475)
> >
> > but I can't find a way to to get the git revision associated with that
> > build.  Any thoughts would be appreciated!
>
> Git metadata is stored in a `BuildData` action, so something like this
> (untested) should work:
>
>
> b475.getAction(hudson.plugins.git.util.BuildData.class).lastBuiltRevision.sha1String
>
> Regards,
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/5668C714.30504%40orr.me.uk
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABnTgtWXk1o10d537DPv37zJe-uFwtnvo9rjZ8E%2BzLkb%3D%2BOitw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to