It looks like the hard coded query parameter issue is a Ruby 1.8 problem.
The post_form code doesn't take hard coded query parameters into account.
# File net/http.rb, line 400
def HTTP.post_form(url, params)
req = Post.new(*url.path*)
req.form_data = params
req.basic_auth url.user, url.password if url.user
new(url.host, url.port).start {|http|
http.request(req)
}
end
It looks like Ruby 1.9 passes along the query parameters in a post, but I
haven't tested it.
# File net/http.rb, line 478
def HTTP.post_form(url, params)
req = Post.new(*url.request_uri*)
req.form_data = params
req.basic_auth url.user, url.password if url.user
new(url.hostname, url.port).start {|http|
http.request(req)
}
end
#
# == Description
#
# Returns the full path for an HTTP request, as required by Net::HTTP::Get.
#
# If the URI contains a query, the full path is URI#path + '?' + URI#query.
# Otherwise, the path is simply URI#path.
#
def request_uri
r = path_query
if r[0] != ?/
r = '/' + r
end
r
end
I don't have control over the server environment that we use to run
Gitorious. The gitorious-plugin for Jenkins was the easiest way for me to
get this working, and it was fun to dig around in some open source projects
;)
Thanks for a great product,
Scott
On Tuesday, October 16, 2012 4:57:13 AM UTC-4, Marius Mårnes Mathiesen
wrote:
>
> On Mon, Oct 15, 2012 at 11:07 PM, Scott Moyer <[email protected]<javascript:>
> > wrote:
>
>> I added functionality to the Jenkins git-plugin to support Gitorious
>> webhooks and they've rolled it off into it's own plugin.
>>
>> <https://wiki.jenkins-ci.org/display/JENKINS/Gitorious+Plugin>
>>
> Scott,
> Great work!
>
>
>> https://wiki.jenkins-ci.org/display/JENKINS/Gitorious+Plugin
>>
>> You can add the git-plugin and gitorious-plugin to jenkins. Create a
>> webhook in Gitorious that will post to
>> http://yourjenkins/gitorious/notifyCommit (or
>> http://yourjenkins/jenkins/gitorious/notifyCommit<http://yourjenkins/gitorious/notifyCommit>
>> in
>> some cases).
>>
>> The gitorious plugin will parse the payload and attempt to kick off a
>> jenkins build.
>>
>> There was a post a while back about someone trying to make this work.
>> The webhook POST in Gitorious was striping off any hard coded query
>> parameters, so it wouldn't work with the git-plugin out of the box.
>>
>
> Is this still a problem?
>
> Cheers,
> - Marius
>
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]