Details
-
Bug
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Won't Do
-
Jenkins 1.617
Workflow 1.8
Description
The REST API isn't available for access to "step" state through the workflow "running steps" page.
e.g. at http://<server>:8080//job/<job name>/<job num>/flowGraphTable/api
I would expect to see a REST API page, indeed there is a link at the bottom of the flowGraphTable page to the REST API page that does not exist.
At the JUC in London Jesse told me that this was probably just a bug, but if you want to make this a feature/improvement request that's fine too
In general I think it would be massively useful to have access to stateful information for the workflow through the REST API i.e. though XML or JSON. That will allow for better flexibility of use and presentation of the data.
Moreover it would also be nice for groovy workflow script developers to be able to "inject" state such that it can be discoverable through the REST API. e.g. to provide contextual information about a particular step in the workflow. In this sense perhaps it could be linked with JENKINS-26107, or a similar feature that would allow groovy workflow scripts to feedback stateful information to the presentation layer.
Though I suppose this could be fudged in the short term e.g. by saving this data in XML/JSON as artifacts which can be presented through the rest API through the page for the job.
Attachments
Issue Links
- is related to
-
JENKINS-26522 Annotated block/stage status
-
- Closed
-
@James Sandlin . Access to pipeline result/logging data was a priority for us, so in the end we wrote wrapper scripts (bash/python) that did the bulk of the work and piped logging output to files, implementing a groovy class that dealt with the collection of results, archiving logs, and generating nicely formatted email reports tailored to meet our needs.
in the end this offered us greater flexibility and control in terms of what gets reported and where vs the stock support. So if the official/unofficial REST APIs don't provide what you need I guess you could go down a similar route i.e. explicitly call functions at points in the groovy pipeline code that are responsible for "publishing" status (to interested users, perhaps beyond a firewall) at particular points in the flow.