Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- agent {
- label 'agent'
- }
- environment {
- PIP_BREAK_SYSTEM_PACKAGES = 1
- scannerHome = tool 'SonarQube'
- }
- stages {
- stage('Get Code') {
- steps {
- git branch: 'jenkinsfile', url: 'https://github.com/Panda-Academy-Core-2-0/Frontend'
- }
- }
- stage('Unit tests') {
- steps {
- sh "pip3 install -r requirements.txt"
- sh "python3 -m pytest --cov=. --cov-report xml:test-results/coverage.xml --junitxml=test-results/pytest-report.xml"
- }
- }
- stage('Sonarqube analysis') {
- steps {
- withSonarQubeEnv('SonarQube') {
- sh "${scannerHome}/bin/sonar-scanner"
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement