Try to fix jenkinsfile inside stages with steps
ci-tests/python-test/pipeline/head There was a failure building this commit

This commit is contained in:
2021-02-02 15:27:23 +02:00
parent b12ebf97b2
commit e6be23a4fe
Vendored
+16 -8
View File
@@ -14,17 +14,25 @@ pipeline {
}
}
stages {
agent {
docker { image "python:$PY_VERSION"
args '-e DJANGO_SETTINGS_MODULE: "locallibrary.settings"'}
}
stage('build') {
sh 'python --version'
agent {
docker { image "python:$PY_VERSION"
args '-e DJANGO_SETTINGS_MODULE: "locallibrary.settings"'}
}
steps {
sh 'python --version'
}
}
stage('test') {
sh 'pip3 install -r requirements.txt'
sh 'python -m pytest catalog/tests/'
sh 'python -m xmlrunner discover -p *_test.py'
agent {
docker { image "python:$PY_VERSION"
args '-e DJANGO_SETTINGS_MODULE: "locallibrary.settings"'}
}
steps {
sh 'pip3 install -r requirements.txt'
sh 'python -m pytest catalog/tests/'
sh 'python -m xmlrunner discover -p *_test.py'
}
}
}
}