python-jenkins-developers team mailing list archive
-
python-jenkins-developers team
-
Mailing list archive
-
Message #00552
[Bug 1784948] Re: Cannot Post File Parameters
I think it's easy enough to implement such a feature. Jenkins API calls
are done by means of python requests library. It supports uploading
files as "multipart encoding upload". As far as I know, Jenkins API
requires file parameters of job to be uploaded in that way.
The only thing required is to call request.Request() with 'files'
parameter according to doc (http://docs.python-
requests.org/en/master/api/).
I've tried to create necessary changes in my fork on github to test it -
https://github.com/goriy/python-
jenkins/commit/1c13d4dae1d38961c2315ee3c10d831ff4c8e80e
Soon I'll try to create some kind of `review request` or `pull request`
or something like that. This is not so clear and easy as I expected it
to be...
--
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/1784948
Title:
Cannot Post File Parameters
Status in Python Jenkins:
New
Bug description:
I'd like to post a file to a Jenkins job but this Python library only
seems to support sending simple parameters like strings that can be
encoded in requests as a simple key-value pair. Files require a
file_path, the name of the param on Jenkins, along with some kind of
Jenkins specific file param which cannot be handled in the current
setup.
Of course, if I'm mistaken and there is a straightforward way to
handle this in Python, that would be great to know!
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1784948/+subscriptions
References