From 99fb0ad1fed1112ffd8c94667760740b8ccaed7c Mon Sep 17 00:00:00 2001 From: Nageshwaran Manikumar Date: Mon, 30 Nov 2026 20:56:51 -0500 Subject: [PATCH] ci: automate Python tests and clean release artifacts refs #15 --- Jenkinsfile.final-project | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Jenkinsfile.final-project b/Jenkinsfile.final-project index 73d324b..cee2f28 100644 --- a/Jenkinsfile.final-project +++ b/Jenkinsfile.final-project @@ -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