Downstream jobs not registering
The job.GetDownstreamJobs() function is not returning my downstream jobs. From looking at the api documentation in the UI, there is a jobs parameter under the primary job that has all the of the subjobs under it. It seems that parameter is not mapped into the struct. Thanks
Will this be fixed with your #54 PR or is it unrelated?
Perhaps related: I have a pipeline job which triggers other jobs, and the jenkins api does not mention the downstream jobs in the rest api for the parent, nor in the rest api for builds of the parent. So job.GetDownstreamJobs() returns no results in this case.
The actual downstream builds do refer to the parent, eg:
{
"_class" : "hudson.model.CauseAction",
"causes" : [
{
"_class" : "hudson.model.Cause$UpstreamCause",
"shortDescription" : "Started by upstream project \"pipeline-test\" build number 63",
"upstreamBuild" : 63,
"upstreamProject" : "pipeline-test",
"upstreamUrl" : "job/pipeline-test/"
}
]
},
But I'm not sure if there's an good way to find all these links, without iterating through all builds in all projects.
It seems there isn't an API to get downstream jobs directly: https://issues.jenkins.io/browse/JENKINS-33001
I also failed to get downstream jobs using job.GetDownstreamJobs(). The version of gojenkins is v1.0.1.