Retrieve parameter from a Jenkins REST query

后端 未结 3 679
日久生厌
日久生厌 2021-02-15 00:03


The following REST query will return parameters of the last successful build of a job: https://localhost/job/test1/lastSuccessfulBuild/api/json
I\'d be interested to

3条回答
  •  盖世英雄少女心
    2021-02-15 00:57

    Here is an example with a public jenkins instance and one of its builds in order to get "candidate_revision" parameter for "lastSuccessfulBuild" build:

    https://jenkins.qa.ubuntu.com/view/All/job/account-plugins-vivid-i386-ci/lastSuccessfulBuild/parameters/

    https://jenkins.qa.ubuntu.com/view/All/job/account-plugins-vivid-i386-ci/lastSuccessfulBuild/api/xml?xpath=/freeStyleBuild/action/parameter[name=%22candidate_revision%22]/value

提交回复
热议问题