On Mon, Jan 6, 2014 at 9:43 AM, Justin Smith <[email protected]> wrote:
> I am trying to use the Web-Hooks with Jenkins-CI.  Jenkins has a plugin to do
> this, see the source:
> https://github.com/jenkinsci/gitorious-plugin/blob/master/src/main/java/org/jenkinsci/plugins/gitorious/GitoriousStatus.java
>
> After not being able to get this to work, I checked out the plugin source,
> and debugged through it.
>
> It turns out, that even though I have the git:// and http:// protocol's
> disabled for checking out (private repo), that the web-hook is reporting the
> repository url how I would see it in a web browser. In my case
> https://gitorious.myserver.net/project/repo
>
> Since I use the ssh url ([email protected]) for everything, I this seems
> to be an issue for me.  Is this the desired, proper, behavior for the webhook
> and URL? Or should it report the push url as well?
>
> If this is how it is SUPPOSED to work, I can try to patch the jenkins plugin
> somehow (not sure how at this moment). If not, could the web-hook possibly
> return the available URL's for accessing the actual repository?


This is an unfortunate problem with the current code for the Jenkins
plugin. As is currently stands, the Jenkins plugin only supports the
URL that Gitorious' web hook sends over JSON, and this happens to be
HTTP.

It would be ideal if the Jenkins plugin provided a "preferred Git URL
scheme" radio box in the user-interface, so that you could easily
change this yourself. The plugin could take the Git URL from JSON and
automatically rewrite the URL scheme to be one of "http://";,
"https://";, "git://", or "SSH", depending on the setting.

Unfortunately I don't know enough of Jenkins' API to implement this
feature. In my work environment, I ended up using this fork of the
Jenkins plugin: https://github.com/Infinidat/gitorious-plugin, which
at least re-writes the URLs to git://. If you study the patches in
that fork you may be able to write your own patch for SSH support.

The Jenkins plugin could certainly use some love :)

- Ken

-- 
-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to