From 04efbb37b9b60bc11f25cb6a61c5a79fc53c9882 Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Thu, 28 Mar 2024 14:26:59 +0530 Subject: [PATCH] change --- Jenkinsfile | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b35babd53..206b9f1b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,17 +21,19 @@ pipeline { infra.withArtifactCachingProxy() { def OPTS = env.MAVEN_SETTINGS ? "-s ${MAVEN_SETTINGS}" : '' OPTS += env.TAG_NAME ? ' -Dspotless.check.skip=true' : '' - sh ''' - ./mvnw -V \ - --no-transfer-progress \ - ${OPTS} \ - verify \ - checkstyle:checkstyle \ - spotbugs:spotbugs \ - -Dmaven.test.failure.ignore \ - -Dcheckstyle.failOnViolation=false \ - -Dspotbugs.failOnError=false - ''' + withEnv(["OPTS=${OPTS}"]) { + sh ''' + ./mvnw -V \ + --no-transfer-progress \ + ${OPTS} \ + verify \ + checkstyle:checkstyle \ + spotbugs:spotbugs \ + -Dmaven.test.failure.ignore \ + -Dcheckstyle.failOnViolation=false \ + -Dspotbugs.failOnError=false + ''' + } } } }