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
d02b139c
Commit
d02b139c
authored
Jun 13, 2015
by
Chris Rohr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding in ability to check status of automatic branch jobs in jenkins
Added change to change log
parent
33dce2df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
CHANGELOG-EE
CHANGELOG-EE
+2
-1
app/models/project_services/jenkins_service.rb
app/models/project_services/jenkins_service.rb
+5
-4
spec/models/project_services/jenkins_service_spec.rb
spec/models/project_services/jenkins_service_spec.rb
+4
-0
No files found.
CHANGELOG-EE
View file @
d02b139c
...
...
@@ -2,9 +2,10 @@ v 7.12 (Unreleased)
- Fix error when viewing merge request with a commit that includes "Closes #<issue id>".
- Enhance LDAP group synchronization to check also for member attributes that only contain "uid=<username>"
- Enhance LDAP group synchronization to check also for submember attributes
- Prevent LDAP group sync from removing a group's last owner
- Prevent LDAP group sync from removing a group's last owner
- Add Git hook to validate maximum file size.
- Project setting: approve merge request by N users before accept
- Support automatic branch jobs created by Jenkins in CI Status
v 7.11.4
- no changes specific to EE
...
...
app/models/project_services/jenkins_service.rb
View file @
d02b139c
...
...
@@ -51,16 +51,17 @@ class JenkinsService < CiService
end
def
build_page
(
sha
,
ref
=
nil
)
project_url
+
"/scm/bySHA1/
#{
sha
}
"
base_url
=
ref
.
nil?
||
ref
==
'master'
?
project_url
:
"
#{
project_url
}
_
#{
ref
}
"
base_url
+
"/scm/bySHA1/
#{
sha
}
"
end
def
commit_status
(
sha
,
ref
=
nil
)
parsed_url
=
URI
.
parse
(
build_page
(
sha
))
parsed_url
=
URI
.
parse
(
build_page
(
sha
,
ref
))
if
parsed_url
.
userinfo
.
blank?
response
=
HTTParty
.
get
(
build_page
(
sha
),
verify:
false
)
response
=
HTTParty
.
get
(
build_page
(
sha
,
ref
),
verify:
false
)
else
get_url
=
build_page
(
sha
).
gsub
(
"
#{
parsed_url
.
userinfo
}
@"
,
""
)
get_url
=
build_page
(
sha
,
ref
).
gsub
(
"
#{
parsed_url
.
userinfo
}
@"
,
""
)
auth
=
{
username:
URI
.
decode
(
parsed_url
.
user
),
password:
URI
.
decode
(
parsed_url
.
password
),
...
...
spec/models/project_services/jenkins_service_spec.rb
View file @
d02b139c
...
...
@@ -51,5 +51,9 @@ eos
describe
:build_page
do
it
{
expect
(
@service
.
build_page
(
"2ab7834c"
,
'master'
)).
to
eq
(
"http://jenkins.gitlab.org/projects/2/scm/bySHA1/2ab7834c"
)
}
end
describe
:build_page_with_branch
do
it
{
expect
(
@service
.
build_page
(
"2ab7834c"
,
'test_branch'
)).
to
eq
(
"http://jenkins.gitlab.org/projects/2_test_branch/scm/bySHA1/2ab7834c"
)
}
end
end
end
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