Build details of pipeline job via API

85 views
Skip to first unread message

Graham Lyons

unread,
Feb 20, 2017, 12:19:25 PM2/20/17
to Jenkins Developers
Hi,

I'm trying to get information about running builds on Jenkins agents, with and without pipelines. 'Old-style' jobs show up just fine but pipelines only ever appear as placeholder tasks:

{
   "currentExecutable": {
     "_class": "org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable"
   },
   "currentWorkUnit": {

    },
   "idle": false,
   "likelyStuck": false,
   "number": 1,
   "progress": 84
 }

I'm using Jenkins ver. 2.19.1 but, looking at the source code, I don't see any changes relating to this in later versions. I could be wrong about that of course.

Is this expected? Is there a way to make it behave differently? How does the /ajaxExecutors endpoint get its data?

If anyone can help then I'd really appreciate it.

Thanks,
Graham

Graham Lyons

unread,
Feb 21, 2017, 4:53:09 AM2/21/17
to Jenkins Developers
OK, so it looks like the /ajaxExecutors endpoint just uses the progress value from this data which is why that works.

Any help on the other points would be gratefully received.

Ta,
G

Graham Lyons

unread,
Feb 21, 2017, 4:59:55 AM2/21/17
to Jenkins Developers
Actually, that still doesn't explain where it gets the build number and URL for the link to the job.

Daniel Beck

unread,
Feb 21, 2017, 5:07:24 AM2/21/17
to jenkin...@googlegroups.com

> On 20.02.2017, at 18:19, Graham Lyons <gra...@grahamlyons.com> wrote:
>
> I'm trying to get information about running builds on Jenkins agents, with and without pipelines.

Please ask questions like this on the jenkinsci-users mailing list.

https://jenkins.io/content/mailing-lists

Thanks!

Graham Lyons

unread,
Feb 21, 2017, 7:09:14 AM2/21/17
to Jenkins Developers, m...@beckweb.net
Thanks Daniel.
Reply all
Reply to author
Forward
0 new messages