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
b692a439
Commit
b692a439
authored
Nov 07, 2014
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Jenkins service: update parser
parent
4359949d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
app/models/project_services/jenkins_service.rb
app/models/project_services/jenkins_service.rb
+5
-4
app/views/projects/services/_form.html.haml
app/views/projects/services/_form.html.haml
+0
-4
No files found.
app/models/project_services/jenkins_service.rb
View file @
b692a439
...
@@ -69,12 +69,13 @@ class JenkinsService < CiService
...
@@ -69,12 +69,13 @@ class JenkinsService < CiService
end
end
if
response
.
code
==
200
if
response
.
code
==
200
status
=
Nokogiri
.
parse
(
response
).
xpath
(
'//img[@class="build-caption-status-icon"]'
).
first
.
attributes
[
'alt'
].
value
# img.build-caption-status-icon for old jenkins version
if
status
.
include?
(
'Success'
)
src
=
Nokogiri
.
parse
(
response
).
css
(
'img.build-caption-status-icon,.build-caption>img'
).
first
.
attributes
[
'src'
].
value
if
src
=~
/blue\.png$/
'success'
'success'
elsif
s
tatus
.
include?
(
'Failed'
)
||
status
.
include?
(
'Aborted'
)
elsif
s
rc
=~
/(red\.png|aborted\.png)$/
'failed'
'failed'
elsif
s
tatus
.
include?
(
'In progress'
)
elsif
s
rc
=~
/anime\.gif$/
'running'
'running'
else
else
'pending'
'pending'
...
...
app/views/projects/services/_form.html.haml
View file @
b692a439
...
@@ -21,10 +21,6 @@
...
@@ -21,10 +21,6 @@
.bs-callout
.bs-callout
=
@service
.
help
=
@service
.
help
-
if
@service
.
help
.
present?
.bs-callout
=
@service
.
help
.form-group
.form-group
=
f
.
label
:active
,
"Active"
,
class:
"control-label"
=
f
.
label
:active
,
"Active"
,
class:
"control-label"
.col-sm-10
.col-sm-10
...
...
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