how to make jenkins run a python script that executes a build?
Learning Jenkins, and trying to get it to build a project for which my build script is written in python.
I've tried using the 'Execute script' and 'Execute Python script'. The script first line is
Jenkins doesn't complain about either attempt, it just seems to ignore the setting, declaring the build successful as soon as the code is checked out.
I've read a few old mail lists that hint that I'll have to write a bash script (build.sh) and have it call the python script. I hope that's not the answer.
You should be able to use an "Execute shell" build step and specify /path/to/build.py -i
I'm guessing that the current directory when the build job runs isn't what you're expecting. Jenkins has a built-in environment variable WORKSPACE that is set to the root of the build's workspace, so assuming that the Python script is at the root of your checked out code, $WORKSPACE/build.py should also work.