Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

support https in jenkins.coffee #1267

Open
larrycai opened this Issue · 15 comments

4 participants

@larrycai

So far it has limited support for https, for example, for some https, Unauthorized request can be accepted, which in turn, we need to set options in https request

rejectUnauthorized to false

@technicalpickles

I just looked at the code, but didn't have that take away. Have you tried to use it and failed? It uses a general JENKINS_URL, so if that is https://whatever it's over https and if it's http://whatever, it's over http, and should just work.

Also, what version of hubot-scripts are you using?

@larrycai

Yes, it is failed for sure, mostly it needs to use "request" module. or extra codes for msg.http (new to here)

I use the latest version of hubot-scripts.

And the node.js jenkisn-api module can be used here to make the function easily.

@technicalpickles

How did it fail exactly? Can you share a transcript of commands used, and error logs you got back?

msg.http is https://github.com/technoweenie/node-scoped-http-client scope. It knows enough to call with http or https depending on the URL given.

And the node.js jenkisn-api module can be used here to make the function easily.

That could be useful. If we are going to add a dependency though, probably should extract this to it's own repository cc #1113

@larrycai
@larrycai
@larrycai
  1. in current jenkins-api, build function is not completed, I just send the pull request.
  2. hopefully in new solution, we could had one extra env like HUBOT_JENKINS_HTTPS_REJECT_UNAUTHORIZED to make it fit more cases
@larrycai
@larrycai larrycai closed this
@technicalpickles

Why did you close? From the blog post, sounds like still need to do the reject unauthorized thing.

@larrycai larrycai reopened this
@larrycai

Actually I asked the IS/IT to fix the https in jenkins server side (they should fix it), then jenkins.coffee works perfect ;-). So I think this reject unauthorized thing should be fixed in server side always.

And also I saw it was connected with others, keep that open and close this, not so clear the process. anyway reopen again.

@rgbkrk

Oh hey, this is exactly the use case for why I made PR github/hubot#612. If you still want me to approach this a bit more (to also include handling gzip via scoped http client), I can work on this in a couple days (work+getting on a plane soon).

@technicalpickles

@rgbkrk if you are up for it, totally!

I don't actually use the jenkins script myself, or have jenkins running directly (we use janky built on top of it), so anyone interested in taking over this script, and moving it to an external package (ie #1113), they would be deserving of many :zap:

@rgbkrk

Oh, I guess I should say it's not about Jenkins for me but about gzip handling and for unauthorized requests (Node and SSL certs are still kind of messy to me - I need enlightenment).

Sorry about my lack of context, I'm saying I could probably work on github/hubot#612

@jmreicha

Has there been any news on this issue? I recently turned HTTPS on for my Jenkins server and am having trouble getting this script to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.