I took another look at this issue. I'm testing with Jenkins LTS 1.565.3 and I just don't see a problem here. I believe I got an error on my last attempt to repro (passing in params) because I didn't setup my job to accept parameters (in the job config page). Once I setup the job to accept parameters in Jenkins I was able to use the build_job method without error (with and without params) which seems like expected behavior to me.
I also double checked this behavior by manually using the Jenkins REST api to start a build with parameters (i.e. http://host:8080/job/myjob/buildWithParameters?foo=bar) on jobs that are not setup for parameterization. I get the following error: javax.servlet.ServletException: java.lang.IllegalStateException: This build is not parameterized! So unless Jenkins allowed users to pass params to jobs that are not setup for parameterization in older versions of Jenkins I don't think this is a valid bug. If anything the real bug is that python-jenkins doesn't provide a useful failure message in this scenario. BTW, I tried the patches from Terry and TianTian and both result in failure when attempting to use build_job with params on jobs that are not not setup for parameterization. -- 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 -- Mailing list: https://launchpad.net/~python-jenkins-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~python-jenkins-developers More help : https://help.launchpad.net/ListHelp

