Re: Retrieving a list of Pipeline jobs

2017-01-06 Thread Emory Penney
Perfect that got me exactly what I needed, thanks!

On Friday, January 6, 2017 at 6:24:30 AM UTC-8, Jesse Glick wrote:
>
> On Thu, Jan 5, 2017 at 7:07 PM, Emory Penney  > wrote: 
> > Neither of those classes have getTrigger() implemented, any tips 
> > for how to get build triggers from Job.class or WorkflowJob.class? 
>
> `ParameterizedJobMixIn.ParameterizedJob.getTriggers()` 
>

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/ba02579e-8d00-48c7-b848-e78562e77875%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieving a list of Pipeline jobs

2017-01-06 Thread Jesse Glick
On Thu, Jan 5, 2017 at 7:07 PM, Emory Penney  wrote:
> Neither of those classes have getTrigger() implemented, any tips
> for how to get build triggers from Job.class or WorkflowJob.class?

`ParameterizedJobMixIn.ParameterizedJob.getTriggers()`

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr02Dgq%2BCPeqELxKY-5vKf-1uc-%2BBG55W61h0LuKvd3foQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieving a list of Pipeline jobs

2017-01-05 Thread Emory Penney
Thanks for the suggestions!  Also, the historical background makes this
much clearer.  Neither of those classes have getTrigger() implemented, any
tips for how to get build triggers from Job.class or WorkflowJob.class?

On Thu, Jan 5, 2017 at 2:19 PM, Jesse Glick  wrote:

> On Thu, Jan 5, 2017 at 3:45 PM, Emory Penney 
> wrote:
> > I've noticed that
> >
> > Jenkins.getInstance().jenkinsInstance.getAllItems(
> AbstractProject.class);
> >
> > doesn't seem to get me a list of Pipelines jobs.  I'm sure I need to use
> a
> > different class but I'm unclear which one.
>
> `Job.class` to get anything, or `WorkflowJob.class` to get Pipeline only.
>
> https://github.com/jenkinsci/pipeline-plugin/blob/master/
> DEVGUIDE.md#historical-background
>
> Currently there is not an official (i.e., API plugin) marker interface
> for `Job` subtypes that would correspond to the
> `FlowExecutionOwner.Executable` marker interface for `Run` subtypes,
> though I have been thinking about adding one as it would be useful on
> occasion.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-dev/PKbpT-84ie4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-dev/CANfRfr1V88O%3DB%2BotL%2BZNRutpGyTfjbdBQnUvyrjykxafJp
> %2BY_g%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CABch0G0RFA2skk3od%2BYLBpzU-HYmsMSYbS4ARR2N6KCb4xJUfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Retrieving a list of Pipeline jobs

2017-01-05 Thread Jesse Glick
On Thu, Jan 5, 2017 at 3:45 PM, Emory Penney  wrote:
> I've noticed that
>
> Jenkins.getInstance().jenkinsInstance.getAllItems(AbstractProject.class);
>
> doesn't seem to get me a list of Pipelines jobs.  I'm sure I need to use a
> different class but I'm unclear which one.

`Job.class` to get anything, or `WorkflowJob.class` to get Pipeline only.

https://github.com/jenkinsci/pipeline-plugin/blob/master/DEVGUIDE.md#historical-background

Currently there is not an official (i.e., API plugin) marker interface
for `Job` subtypes that would correspond to the
`FlowExecutionOwner.Executable` marker interface for `Run` subtypes,
though I have been thinking about adding one as it would be useful on
occasion.

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1V88O%3DB%2BotL%2BZNRutpGyTfjbdBQnUvyrjykxafJp%2BY_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Retrieving a list of Pipeline jobs

2017-01-05 Thread Emory Penney
Hi,

Sorry for the noob question, I'm sure this is answered somewhere in the 
documentation I'm just completely unable to find it...

I've noticed that

Jenkins.getInstance().jenkinsInstance.getAllItems(AbstractProject.class);


doesn't seem to get me a list of Pipelines jobs.  I'm sure I need to use a 
different class but I'm unclear which one.  Or is there a different 
preferred method for getting a list of pipeline jobs?

Thanks in advance for your help.

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/6bf2465f-e322-405e-846d-9d8d84ed156d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.