Jenkins Pipeline jobs have a feature to execute Groovy scripts from SCM via Pipeline -> Definition -> Pipeline Script from SCM
. Ideally I'd like to execute a Python script instead, via a freestyle job, via SCM, because:
- I don't want to have to deploy Python scripts directly to my Jenkins instance
- I don't need a pipeline for jobs that only do one thing
- It would be nice to pass parameters from the Jenkins environment directly to my Python CLI
Is it possible to create a build step in a Jenkins freestyle job that executes a Python script from SCM?
question from:https://stackoverflow.com/questions/65672063/executing-python-script-from-scm-as-jenkins-freestyle-job-build-step