diff --git a/Jenkinsfile b/Jenkinsfile index affc54b..88f1a70 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' + } } } }