node { stage('SCM') { checkout scm } stage('SonarQube Analysis') { def scannerHome = tool 'Sonar'; withSonarQubeEnv() { sh "${scannerHome}/bin/sonar-scanner" } } }