That isn't super easy because I believe that the parameterized trigger is
using the same UbstreamCause as the builtin "trigger other builds". But if
you don't care about that here's a Groovy example that should list all jobs
with a build triggered by an upstream build (among the last 100 builds)

import hudson.model.AbstractBuild
import hudson.model.AbstractProject
import hudson.model.Cause
import hudson.model.Items
import jenkins.model.Jenkins

Items.getAllItems(Jenkins.instance, AbstractProject).each { AbstractProject
p ->
    if (p.builds.any { AbstractBuild b -> b.getCause(Cause.UpstreamCause)
!= null }) {
        println(p.getFullDisplayName())
    }
}

A small change and you can list all builds as well.

/B

On Wed, Oct 15, 2014 at 9:19 AM, Manoj Thakkar <[email protected]>
wrote:

> Hi,
>
> I am trying to get list of all jobs started by the parameterized trigger
> plugin, how do i get it using groovy/java api.
>
>
>  --
> 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/d/optout.
>



-- 
Robert Sandell
*Software Engineer*
*CloudBees Inc.*

-- 
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/d/optout.

Reply via email to