Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.84 KB | None | 0 0
  1. pipeline {
  2.          agent any
  3.          stages {
  4.                  stage('Checkout') {
  5.                  steps {
  6.                      echo 'Retrieving Jenkinsfile from the github repository.'
  7.                    checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: 'dummy']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/humblemetsuke/coursework_2']]])
  8.                  }
  9.                  }
  10.                  
  11.         stage('SonarQube') {
  12.     environment {
  13.         scannerHome = tool 'SonarQube'
  14.     }
  15.     steps {
  16.         withSonarQubeEnv('SonarQube') {
  17.             sh "${scannerHome}/bin/sonar-scanner"
  18.         }
  19.         timeout(time: 10, unit: 'MINUTES') {
  20.             waitForQualityGate abortPipeline: true
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement