Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
gitlab2jenkins
Commits
a8417724
Commit
a8417724
authored
Jul 23, 2014
by
Jan Včelák
🚀
Browse files
Merge pull request #4 from abrindeyev/master
Bugfixes
parents
46024a2b
a86b1cf4
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/jenkins_connector.rb
View file @
a8417724
...
...
@@ -59,7 +59,7 @@ class JenkinsConnector
def
extract_build_info
(
data
)
result
=
{
:build
=>
data
[
"number"
],
:status
=>
build_status_from_api
(
data
[
"result"
]
),
:status
=>
build_status_from_api
(
data
),
:created_at
=>
nil
,
:commit
=>
nil
,
:branch
=>
nil
...
...
@@ -104,7 +104,9 @@ class JenkinsConnector
result
end
def
build_status_from_api
(
api_string
)
def
build_status_from_api
(
build
)
return
"running"
if
build
[
"building"
]
api_string
=
build
[
"result"
]
if
api_string
.
nil?
nil
else
...
...
@@ -112,7 +114,8 @@ class JenkinsConnector
when
"success"
then
"success"
when
"aborted"
then
"canceled"
when
"running"
then
"running"
else
"failed"
when
"failure"
then
"failed"
else
nil
end
end
end
...
...
web.rb
View file @
a8417724
...
...
@@ -84,7 +84,7 @@ get '/projects/:job_id/builds/:commit/status.json' do
if
commit
.
status
.
nil?
status
=
"running"
elsif
[
"success"
,
"failed"
].
include?
commit
.
status
elsif
[
"success"
,
"failed"
,
"running"
].
include?
commit
.
status
status
=
commit
.
status
else
status
=
"failed"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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