I am having issues in executing a Python script from a Jenkins Pipeline. I already have a Jenkins Multi job Pipeline, in which I am introducing an extra Build step which will execute my Python script.
In the 'Build Step' in Jenkins I noticed an option "Execute Python Script" in which I added my Python Script, when I execute the job, it fails at my Python code with a syntax error. Please note that my Python code works well in a local IDE.
I am not sure what I am doing wrong. Can we not execute Python code directly from the Jenkins Build step? Is there any other way I could execute?