Commit ba742c38 authored by Matija Čupić's avatar Matija Čupić

Rescue non-matching responses

parent b371a42b
......@@ -101,7 +101,12 @@ class JenkinsDeprecatedService < CiService
if response.code == 200
# img.build-caption-status-icon for old jenkins version
begin
src = Nokogiri.parse(response).css('img.build-caption-status-icon,.build-caption>img').first.attributes['src'].value
rescue NoMethodError => ex
return :error
end
if src =~ /blue\.png$/ || (src =~ /yellow\.png/ && pass_unstable?)
'success'
elsif src =~ /(red|aborted|yellow)\.png$/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment