From 677f454573f21aedff06dc2172b2b0683feddd4e Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Wed, 6 Sep 2017 10:56:47 -0500 Subject: [PATCH] Moved SQ tool lookup to environment section. --- Jenkinsfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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" } } }