From 60a6d745869a74c97226fe5dec3531bcf8c7f169 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Wed, 6 Sep 2017 11:26:56 -0500 Subject: [PATCH] Moved the tool call back to a step since it wasn't being interpreted in the ENVIRONMENT section. --- Jenkinsfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 50bc2f60c..1f7ff004b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,6 @@ pipeline { - environment { - SQ_SCANNER = tool 'SonarQube_Scanner_3.0.3.778'; - } + //environment { + //} tools { maven 'Maven 3.5.0' @@ -33,10 +32,14 @@ pipeline { // '-Dsonar.test.inclusions=**/*Test*/** ' + // '-Dsonar.exclusions=**/*Test*/**' //} + + script { + scannerHome = tool 'SonarQube_Scanner_3.0.3.778'; + } withSonarQubeEnv('Staging') { - echo "${SQ_SCANNER}" - sh "${SQ_SCANNER}/bin/sonar-scanner" + echo "${scannerHome}" + sh "${scannerHome}/bin/sonar-scanner" } } }