ci: automate Python tests and clean release artifacts refs #15

This commit is contained in:
2026-11-30 20:56:51 -05:00
parent 6cee97faa6
commit 99fb0ad1fe
+17
View File
@@ -56,6 +56,22 @@ pipeline {
}
}
stage('Python Unit Tests') {
steps {
dir('pricing-service') {
sh '''
set -eu
export PYTHONPATH=/var/jenkins_home/final-project-python-deps
export PYTHONDONTWRITEBYTECODE=1
python3 -m unittest -v test_app
echo "Python unit tests PASSED"
'''
}
}
}
stage('Versioned Package') {
steps {
sh '''
@@ -63,6 +79,7 @@ pipeline {
VERSION="1.0.${BUILD_NUMBER}"
rm -rf dist
mkdir -p dist
printf '%s\\n' "$VERSION" > dist/VERSION
git rev-parse HEAD > dist/COMMIT