Jenkins REST API to get job and job console log

后端 未结 4 1426
日久生厌
日久生厌 2021-02-10 03:18

How to get the details of the job along with it console output using Jenkins REST API

example of builds

console output:

I am using foll

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-10 03:59

    So for using the consoleFull i'm getting very dirty output using curl

    example:

    curl -s -S  -u "user":"password" "http://jenkins.domain.com/job/my_job_name/1077/consoleFull"
    

    output: many lines wrapped with html stuff:

     09:04:32 ok:
    

    so my solution is to use:

    curl -s -S  -u "user":"password" "http://jenkins.domain.com/job/my_job_name/1077/logText/progressiveText?start=0"
    

    and you will get the same console log output without the html,span stuff

提交回复
热议问题