Created Jenkinsfile

This commit is contained in:
JKuijperM 2026-01-16 23:02:47 +01:00
parent e531dec8fe
commit f0e90a6b03

46
expenses_manager/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,46 @@
pipeline{
agent any
environment {
DJANGO_SETTINGS_MODULE = "expenses_manager.settings"
PYTHONUNBUFFERED = "1"
}
stages {
stage('Checkout') {
steps {
scm
}
}
stage('Setup Python') {
steps {
sh '''
python --version
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
'''
}
}
stage('Run tests') {
steps {
sh '''
. venv/bin/activate
pytest --cov
'''
}
}
}
post {
always {
echo 'Pipeline finished'
}
failure {
echo 'Tests failed'
}
}
}