Reputation: 85
I didn't found a solution for Windows: This is only working for Linux:
How can I call a py script in a Jenkins File (Pipeline)?
pipeline {
agent { docker { image 'python:3.8.1' } }
stages {
stage('build') {
steps {
sh 'python --version'
}
}
}
}
Upvotes: 0
Views: 4784
Reputation: 11
As you know, the sh command let you invoke the Linux shell.
To execute your Python script on Windows, you should have the following step:
steps {
bat 'python --version'
}
Upvotes: 0