Advertisement
PandaAcademy

Jenkinsfile

Sep 22nd, 2023 (edited)
993
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.70 KB | None | 0 0
  1. pipeline {
  2.     agent any
  3.  
  4.     stages {
  5.         stage('Build') {
  6.             steps {
  7.                 git branch: 'main', url: 'https://github.com/KoRnZYSIEK/frontend_test'
  8.  
  9.                 sh """pkill -f app.py || true
  10.                      virtualenv venv && . venv/bin/activate
  11.                      pip3 install -r requirements.txt
  12.                      python3 -m pytest --cov=. --cov-report xml:test-results/coverage.xml --junitxml=test-results/pytest-report.xml
  13.                      BUILD_ID=dontKillMe nohup python3 app.py &"""
  14.             }
  15.             post {
  16.                 always {
  17.                     junit 'test-results/*.xml'
  18.                 }
  19.             }
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement