Jenkins trigger the 2nd job when the first job fails



  • There is a system that periodically runs on Jenkins and that I follow with selenium. (I'm checking its performance on "manager/status" page in Tomcat). I want it to trigger the second job, which will make detailed logging (*1) only when there is an error in the job. How can I do it?

    When the first job is successful I can trigger the 2nd job but what I need is to trigger the 2nd job when the first job fails enter image description here

    (*1) I'm checking the geoserver performance. "http://serverip:port/geoserver/rest/monitor/requests.csv?order=totalTime;ASC" will download the performance values on geoserver server in "xls" format on jenkins server.



  • Use the Parameterized Trigger ( https://plugins.jenkins.io/parameterized-trigger/ ) in your Post Build Actions. In my example I did not pass any parameters to the new job.

    enter image description here


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2