Jenkins - Get last completed build status

后端 未结 2 909
半阙折子戏
半阙折子戏 2020-12-23 11:25

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

2条回答
  •  死守一世寂寞
    2020-12-23 12:13

    Try http://$host/job/$jobname/lastSuccessfulBuild/api/json

    Jenkins (and Hudson) expose multiple different builds, such as lastBuild, lastStableBuild, lastSuccessfulBuild, lastFailedBuild, lastUnstableBuild, lastUnsuccessfulBuild, lastCompletedBuild.

提交回复
热议问题