Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ba742c38
Commit
ba742c38
authored
Nov 13, 2017
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rescue non-matching responses
parent
b371a42b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
app/models/project_services/jenkins_deprecated_service.rb
app/models/project_services/jenkins_deprecated_service.rb
+6
-1
No files found.
app/models/project_services/jenkins_deprecated_service.rb
View file @
ba742c38
...
@@ -101,7 +101,12 @@ class JenkinsDeprecatedService < CiService
...
@@ -101,7 +101,12 @@ class JenkinsDeprecatedService < CiService
if
response
.
code
==
200
if
response
.
code
==
200
# img.build-caption-status-icon for old jenkins version
# img.build-caption-status-icon for old jenkins version
src
=
Nokogiri
.
parse
(
response
).
css
(
'img.build-caption-status-icon,.build-caption>img'
).
first
.
attributes
[
'src'
].
value
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?
)
if
src
=~
/blue\.png$/
||
(
src
=~
/yellow\.png/
&&
pass_unstable?
)
'success'
'success'
elsif
src
=~
/(red|aborted|yellow)\.png$/
elsif
src
=~
/(red|aborted|yellow)\.png$/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment