jenkins_api_client
jenkins_api_client copied to clipboard
Check if build is likely stuck
Hi We had issues in production where running jobs gets stuck and had to be stopped instantly, otherwise the whole master gets stuck.
I am doing something like this for each @client.job.list_by_status('running')
def is_job_stuck?(job_name) url = "#{@jenkins_master_url}/job/#{job_name}/lastBuild/api/xml?depth=1" return xml.xpath("//matrixBuild/executor/likelyStuck").text == 'true' end using this method made our production server much more stable and it would be great if you added this functionality.
BTW, great job!