I tried to build a job in jenkins using python jenkinsapi, I tried passing nested dict as a parameter to build the job,
server = Jenkins(args.host,
username=jenkins_credentials['user'],
password=jenkins_credentials['key'],
ssl_verify=False)
server.build_job(job, {'VENOM_ENV': job_parameters['jenkins']['parameters']})
->
job_parameters['jenkins']['parameters']}
-> is a nested dictionary itself.
I am hitting the below error:
headers={'Content-Type': 'application/x-www-form-urlencoded'}, status=500, text=<html><head><title>Error</title><body>
<p>An error occurred processing your request. Ask your Jenkins administrator to look up details. ErrorID=bb2f5954-074d-437d-bb62-ecc0e3be5590</p>
<hr><a href="https://wiki.jenkins-ci.org/display/JENKINS/Suppress+Stack+Trace+Plugin">Stack trace suppressed by the suppress stack trace plugin</a>
</body></html>
When i checked with the jenkins team, they found the issue to be with the parameter passed:
javax.servlet.ServletException: java.lang.IllegalArgumentException: Illegal number of parameter values for VENOM_ENV: 21
Note: I used same parameter with jenkins module of python, I do not see any issue there.
What I am missing?