Commit f1e38963 authored by Drew Blessing's avatar Drew Blessing

Fix Jenkins Auth

parent 95cfe768
...@@ -60,7 +60,18 @@ class JenkinsService < CiService ...@@ -60,7 +60,18 @@ class JenkinsService < CiService
end end
def commit_status sha def commit_status sha
parsed_url = URI.parse(build_page(sha))
if parsed_url.userinfo.blank?
response = HTTParty.get(build_page(sha), verify: false) response = HTTParty.get(build_page(sha), verify: false)
else
get_url = build_page(sha).gsub("#{parsed_url.userinfo}@", "")
auth = {
username: URI.decode(parsed_url.user),
password: URI.decode(parsed_url.password),
}
response = HTTParty.get(get_url, verify: false, basic_auth: auth)
end
if response.code == 200 if response.code == 200
if response.include?('alt="Success"') if response.include?('alt="Success"')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment