python-jenkins-developers team mailing list archive
-
python-jenkins-developers team
-
Mailing list archive
-
Message #00009
[Bug 811044] Re: With authorization, build job doesn't work using POST request
Hi
At the moment I'm just evaluating Jenkins so it's running on a Ubuntu
10.04 32-bit VM, installed from packages using the instructions at
https://wiki.jenkins-
ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu. I'm running my
Python script on a different machine (actually the VM host, which is
running Ubuntu 10.10 32-bit). Python version 2.6.6.
Normally I've been running Jenkins behind an Apache reverse proxy,
though to test this bug I disabled that and accessed it directly via
Winstone (same issue either way).
Jenkins security is configured as "Jenkins user database", "Matrix-based
security".
I'm basically trying to run something like the following script:
j = Jenkins("http://path-to-jenkins/","User","Password")
j.build_job('job', {'PARAMETER': 'blah'})
I added some debug prints into jenkins_open and the other request
performed by build_job worked fine (the one triggered by job_exists). It
was only the line I quoted in the bug report that failed, and it worked
as soon as I removed the empty string parameter.
--
You received this bug notification because you are a member of Python
Jenkins Developers, which is the registrant for Python Jenkins.
https://bugs.launchpad.net/bugs/811044
Title:
With authorization, build job doesn't work using POST request
Status in Python API for Jenkins:
Incomplete
Bug description:
I've just stumbled into this project and am trying to use your latest
version from source control along with Jenkins version 1.420 (the
Ubuntu package version).
Using authorization, I get a 403 response to the request in build_job:
return
self.jenkins_open(urllib2.Request(self.build_job_url(name, parameters,
token), ''))
If I remove the empty data string (which I understand means the
request is GET rather than POST), everything works fine.
return
self.jenkins_open(urllib2.Request(self.build_job_url(name, parameters,
token)))
Not really sure if the cause for this is a bug in Jenkins or a problem with your script?
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/811044/+subscriptions
References