/
orosho
/
simple-python-app
Обзор
Документация
Войти
/
orosho
/
simple-python-app
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
jenkins/Jenkinsfile
59 строк
1 KB
orosho
update jenkins/Jenkinsfile
26 дек 2025, 22:48
26 дек 2025, 22:48
6a58a5b
Код
Авторство
О чём код?
pipeline { agent { docker { image 'python:3.13.7-alpine' args '-v /var/run/docker.sock:/var/run/docker.sock' } } options { skipStagesAfterUnstable() } stages { stage("Setup") { steps { sh ''' python -m venv venv . venv/bin/activate pip install -r requirements.txt ''' } } stage('Build') { steps { sh ''' . venv/bin/activate python -m py_compile sources/add2vals.py sources/calc.py ''' stash(name: 'compiled-results', includes: 'sources/*.py*') } } stage('Test') { steps { sh ''' . venv/bin/activate py.test --junit-xml test-reports/results.xml sources/test_calc.py ''' } post { always { junit 'test-reports/results.xml' } } } stage('Deliver') { steps { echo "Собираю дистрибутив" } post { success { archiveArtifacts artifacts: '**/*.py' } } } } }