I need to start a hudson job from python, and then wait for it to complete.
This pages suggests a Python API, where can I find further information on this?
I need to start a hudson job from python, and then wait for it to complete.
This pages suggests a Python API, where can I find further information on this?
Here's my solution in jython:
The python API is the same as the json api. The only difference is that you you eval() on the returning code and you get python objects rather than having to call a json library.
Answering your original question in pure python this is what I did for our job (this is called as a post commit hook) Please note we have http auth in front of our hudson which makes things more complicated.
There is a project called JenkinsAPI which provides a high-level API which (amongst other things) can be used to trigger Jenkins jobs. The syntax is this: