在 Jenkins 中休息 API 以获取管道(阶段)信息

Rest API in Jenkins to get the Pipeline (stages) information

我正在探索通过 Rest API 在 Jenkins 中获取管道(阶段)信息的选项。我们在 Jenkins 上安装了一个管道插件。

非常感谢任何帮助。

您可以使用此端点获取管道 运行s:

https://github.com/jenkinsci/pipeline-stage-view-plugin/tree/master/rest-api#get-jobjob-namewfapiruns

每个 运行 blob 应包含相应的阶段,因此您可以提取最新的 运行.

的阶段