Skip to content

Instantly share code, notes, and snippets.

@ming-chu
Created December 21, 2023 09:04
Show Gist options
  • Save ming-chu/26563486828b51779187d341d22685e1 to your computer and use it in GitHub Desktop.
Save ming-chu/26563486828b51779187d341d22685e1 to your computer and use it in GitHub Desktop.
Sample Jenkinsfile for python3
pipeline {
agent {
docker {
image 'python:3-alpine'
}
}
stages {
stage('build') {
steps {
echo 'build....'
}
}
stage('test') {
steps {
echo 'test...'
}
}
stage('for the PR') {
when {
branch 'PR-*'
}
steps {
echo 'this only runs for the PRs'
sh "python --version"
sh "pwd"
sh "ls -l"
sh "cat manage.py"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment