diff --git a/Jenkinsfile b/Jenkinsfile index 160bd5ec9..110dbb102 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,7 @@ pipeline { - //environment { - //} + environment { + SQ_SCANNER = tool 'SonarQube Scanner 3.0.3.778'; + } tools { maven 'Maven 3.5.0' @@ -33,11 +34,8 @@ pipeline { // '-Dsonar.exclusions=**/*Test*/**' //} - script { - def scannerHome = tool 'SonarQube Scanner 3.0.3.778'; - } withSonarQubeEnv('Staging') { - sh "${scannerHome}/bin/sonar-scanner" + sh "${SQ_SCANNER}/bin/sonar-scanner" } } }