Permalink
Browse files

Support HTTPS jenkins installations in Builder

  • Loading branch information...
1 parent 7c53b7e commit 9b73555fe2dd2c797e60357877544434bf1689b4 @gavinheavyside gavinheavyside committed Jan 26, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/janky/builder/http.rb
@@ -8,6 +8,10 @@ def initialize(username, password)
def run(params, create_url)
http = Net::HTTP.new(create_url.host, create_url.port)
+ if create_url.scheme == "https"
+ http.use_ssl = true
+ end
+
request = Net::HTTP::Post.new(create_url.path)
if @username && @password
request.basic_auth(@username, @password)
@@ -24,6 +28,10 @@ def run(params, create_url)
def output(url)
http = Net::HTTP.new(url.host, url.port)
+ if url.scheme == "https"
+ http.use_ssl = true
+ end
+
request = Net::HTTP::Get.new(url.path)
if @username && @password
request.basic_auth(@username, @password)

0 comments on commit 9b73555

Please sign in to comment.