| 1 |
pipeline { |
| 2 |
agent any |
| 3 |
stages { |
| 4 |
stage('Run pytest') { |
| 5 |
steps { |
| 6 |
sh 'pip install --user --upgrade pytest' |
| 7 |
sh 'pip install --user --upgrade -r requirements.txt' |
| 8 |
sh 'python -m pytest' |
| 9 |
} |
| 10 |
} |
| 11 |
|
| 12 |
stage('Run SonarQube') { |
| 13 |
steps { |
| 14 |
withSonarQubeEnv(installationName: 'rcon', credentialsId: '4cdfb484-a052-41be-8739-3e1c232b5f38') { |
| 15 |
sh '/opt/sonar-scanner/bin/sonar-scanner' |
| 16 |
} |
| 17 |
|
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
stage('Send Email') { |
| 22 |
steps { |
| 23 |
mail(subject: '[rcon] build successful', body: 'https://jenkins.richard-neumann.de/blue/organizations/jenkins/rcon/activity', from: '[email protected]', to: '[email protected]') |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
} |
| 28 |
} |