← Back to team overview

python-jenkins-developers team mailing list archive

[Bug 1177831] Re: build_job with parameters fails since POST is not used.

 

With Wikimedia Jenkins 1.565.3, attempting to pass a parameter to a job
that does not support parameter throw a Jenkins server side stacktrace
and yields an HTTP 500.

When triggering a build with:

  job = j.build_job('test-hashar-dummy', {'para1': 1})

And the server receives:

 "GET /ci/job/test-hashar-dummy/buildWithParameters?para1=1 HTTP/1.1"
201

So we emit GET and Jenkins 1.565.3 is honoring it.


Interestingly, if I head to the web form at https://integration.wikimedia.org/ci/job/test-hashar-dummy/buildWithParameters , it asks me to POST. But maybe the REST API does not actually needs it :-/

-- 
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1177831

Title:
  build_job with parameters fails since POST is not used.

Status in Python API for Jenkins:
  In Progress

Bug description:
  Jenkins requires a POST when a job URL has parameters.  Since python-
  jenkins does not pass urllib2.urlopen a data value a GET is used
  instead.  This results in a failure and the Jenkins error page is
  returned.

  To reproduce this bug:

  - Create a job with parameters.
  - In ipython:
  import jenkins
  j = jenkins.Jenkins(url)
  j.build_job(job_name, {param : value})

  This will fail.

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1177831/+subscriptions


References