Hudson\Jenkins 个人构建步骤结果

发布于 2024-12-21 01:45:04 字数 96 浏览 2 评论 0原文

我正在尝试获取任何 Hudson\Jenkins 作业的单独构建步骤结果。是否可以通过插件内的 Hudson Java API 或远程 api 获取数据?

谢谢。

I am trying to get the individual build step results of any Hudson\Jenkins Job. Is it possible to get the data via Hudson Java API inside the plugin or through remote api?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱已欠费 2024-12-28 01:45:04

以下链接将为您提供一些描述上次成功构建的 XML。这是通过 Jenkins API

http://<Your_Servers_Hostname>:8080/jenkins/job/<JOB_NAME>/lastSuccessfulBuild/api/xml

请注意,您会得到一个包含作业状态的标签。

如果您不喜欢 xml,您可以获取如下所示的 json:

http://<Your_Servers_Hostname>:8080/jenkins/job/<JOB_NAME>/lastSuccessfulBuild/api/json

以及类似的 Python api:

http://<Your_Servers_Hostname>:8080/jenkins/job/<JOB_NAME>/lastSuccessfulBuild/api/python

如果您想要更多文档,请访问

http://<Your_Servers_Hostname>:8080/jenkins/api/

,它应该为您提供一些有关 Jenkins API 的有用信息。您甚至可以将 URL 构造为查询,例如:

http://<Your_Servers_Hostname>:8080/jenkins/job/<JOB_NAME>/lastSuccessfulBuild/api/xml?xpath=/*/result

这将为您提供一个 xml 片段,其中仅包含最新成功构建的结果。

祝你好运!

The following link will get you some XML describing the last successful build. This is going through the Jenkins API

http://<Your_Servers_Hostname>:8080/jenkins/job/<JOB_NAME>/lastSuccessfulBuild/api/xml

Please notice that you get a tag that contains the state of the job.

If you don't like xml, you can get json like this:

http://<Your_Servers_Hostname>:8080/jenkins/job/<JOB_NAME>/lastSuccessfulBuild/api/json

and a Python api like:

http://<Your_Servers_Hostname>:8080/jenkins/job/<JOB_NAME>/lastSuccessfulBuild/api/python

If you want more documentation, go to

http://<Your_Servers_Hostname>:8080/jenkins/api/

and it should give you some good information about the Jenkins API. You can even construct your URL to be a query, for example:

http://<Your_Servers_Hostname>:8080/jenkins/job/<JOB_NAME>/lastSuccessfulBuild/api/xml?xpath=/*/result

That will give you an xml fragment with just the result of the latest successful build.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文