Created
December 21, 2023 09:04
-
-
Save ming-chu/26563486828b51779187d341d22685e1 to your computer and use it in GitHub Desktop.
Sample Jenkinsfile for python3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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