1

We do trigger a jenkins job with curl curl http://jenkins.corp.de:8080/job/CI-Control/buildWithParameters?sw=HGSTR.62-32

this runs fine if the job is enabled. but if we disable the job the return string is very confusing.

How do I check the job state ? And how can I put useful descriptive strings into the return codes ?

stackelk
  • 61
  • 5
  • There are some helpful articles https://stackoverflow.com/questions/28311030/check-jenkins-job-status-after-triggering-a-build-remotely and https://serverfault.com/questions/309848/how-do-i-check-the-build-status-of-a-jenkins-build-from-the-command-line – Pavel Anikhouski Mar 12 '19 at 13:42

1 Answers1

-1

From any page in Jenkins you can click on "REST API" at the bottom of the page, then select either XML or JSON and view all the available endpoints for whatever resource you are viewing.

Go to the page of your job and then follow the above steps. You will see many values that you can retrieve with CURL.

JShorthouse
  • 1,450
  • 13
  • 28