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
ee3a0ed6
Commit
ee3a0ed6
authored
Aug 19, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
yellow jenkins -> failed build
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
d72cc7fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/project_services/jenkins_service.rb
app/models/project_services/jenkins_service.rb
+1
-1
spec/models/project_services/jenkins_service_spec.rb
spec/models/project_services/jenkins_service_spec.rb
+1
-1
No files found.
app/models/project_services/jenkins_service.rb
View file @
ee3a0ed6
...
...
@@ -72,7 +72,7 @@ class JenkinsService < CiService
if
response
.
code
==
200
# 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
if
src
=~
/
(blue\.png|yellow\.png)
$/
if
src
=~
/
blue\.png
$/
'success'
elsif
src
=~
/(red|aborted|yellow)\.png$/
'failed'
...
...
spec/models/project_services/jenkins_service_spec.rb
View file @
ee3a0ed6
...
...
@@ -45,7 +45,7 @@ eos
end
describe
:commit_status
do
statuses
=
{
'blue.png'
=>
'success'
,
'yellow.png'
=>
'
success
'
,
'red.png'
=>
'failed'
,
'aborted.png'
=>
'failed'
,
'blue-anime.gif'
=>
'running'
,
'grey.png'
=>
'pending'
}
statuses
=
{
'blue.png'
=>
'success'
,
'yellow.png'
=>
'
failed
'
,
'red.png'
=>
'failed'
,
'aborted.png'
=>
'failed'
,
'blue-anime.gif'
=>
'running'
,
'grey.png'
=>
'pending'
}
statuses
.
each
do
|
icon
,
state
|
it
"should have a status of
#{
state
}
when the icon
#{
icon
}
exists."
do
stub_request
(
:get
,
"http://jenkins.gitlab.org/projects/2/scm/bySHA1/2ab7834c"
).
to_return
(
status:
200
,
body:
status_body_for_icon
(
icon
),
headers:
{})
...
...
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