node {

  stage('SonarQube analysis') {
    def scannerHome = tool 'sonarscanner';
    withSonarQubeEnv('sonar') { 
      sh "${scannerHome}/bin/sonar-scanner"
    }
  }
}