Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- node {
- def mvnHome
- stage('Preparation') {
- mvnHome = tool 'Maven'
- }
- stage('Build') {
- sh "'${mvnHome}/bin/mvn' -f proyecto-clave/pom.xml clean install"
- }
- stage("SonarQube analysis") {
- withSonarQubeEnv('SonarQube') {
- sh "'${mvnHome}/bin/mvn' -f proyecto-clave/pom.xml sonar:sonar"
- }
- }
- stage("Quality Gate") {
- timeout(time: 1, unit: 'HOURS') {
- // Parameter indicates whether to set pipeline to UNSTABLE if Quality Gate fails
- // true = set pipeline to UNSTABLE, false = don't
- // Requires SonarQube Scanner for Jenkins 2.7+
- waitForQualityGate abortPipeline: true
- }
- }
- }
Add Comment
Please, Sign In to add comment