詹金斯 - 获取最后完成的构建状态 [英] Jenkins - Get last completed build status
问题描述
我知道我可以叫本地主机/工作/ RSpec的/ lastBuild / API / JSON
来获取介绍最新詹金斯打造的状态。但是,由于我们的构建运行速度非常长(几个小时),我真的更感兴趣的是最后的完成建立比是运行的状态在这个确切的时刻运行的的。
I know I can call localhost/job/RSpec/lastBuild/api/json
to get the status of the lastest Jenkins build. However, since our build runs very long (a couple hours), I'm really more interested in the last complete build status than the run that is running at this exact moment.
有没有一个API终点最后一个完全运行构建?或者我应该代替拉建立的完整列表,并从那里选择下一个到最后一个?
Is there an api end point for the last fully run build? Or should I instead pull the full list of builds and select the next-to-last one from there?
推荐答案
尝试的http:// $主机/工作/ $作业名称/ lastSuccessfulBuild / API / JSON
Try http://$host/job/$jobname/lastSuccessfulBuild/api/json
詹金斯(和Hudson)公开多个不同的版本,如 lastBuild,lastStableBuild,lastSuccessfulBuild,lastFailedBuild,lastUnstableBuild,lastUnsuccessfulBuild ,lastCompletedBuild 。
Jenkins (and Hudson) expose multiple different builds, such as lastBuild, lastStableBuild, lastSuccessfulBuild, lastFailedBuild, lastUnstableBuild, lastUnsuccessfulBuild, lastCompletedBuild.
这篇关于詹金斯 - 获取最后完成的构建状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!