Read list of GitStep from inside a Project

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Read list of GitStep from inside a Project

felipesfaraco
Hi,

I am looking for a way to read the list of GitStep from within a Project instance (or Job, or Queue.Item), similar to what Project.getBuilders() provides you.

Then I could access the user-defined inputs such as branches to track and repo url.

This seems possible by adding a dependency on Git plugin, and using Revision/Branch objects. (I haven't followed this route yet, as I am trying to avoid such dependency).

Thanks


--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/c9e389d0-8e77-4157-94d2-816f891d3086%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Read list of GitStep from inside a Project

Jesse Glick-4
On Mon, Feb 18, 2019 at 2:13 AM <[hidden email]> wrote:
> I am looking for a way to read the list of GitStep from within a Project instance (or Job, or Queue.Item), similar to what Project.getBuilders() provides you.

Not exactly possible for Pipeline projects (since the exact steps may
vary from build to build) but you can use

https://javadoc.jenkins.io/jenkins/triggers/SCMTriggerItem.SCMTriggerItems.html#asSCMTriggerItem-hudson.model.Item-

which would reflect the last successful build.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr32TzRHRwTOB5MhhytaiRKUhqw_hcyNmGRmG339UhDHNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.