From c531f2192f29c0983adcfad41171ff77e385109b Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sun, 7 Nov 2021 15:00:07 +0000 Subject: Jenkins DSL: Adjust batchFile() in Test-Environment-Job as it only expects a String Also fix incorrect nesting of "condition", "runner", "steps" elements inside "conditionalSteps" git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894815 13f79535-47bb-0310-9956-ffa450edef68 --- jenkins/create_jobs.groovy | 54 ++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/jenkins/create_jobs.groovy b/jenkins/create_jobs.groovy index 761e1af34a..a14b9bebb7 100644 --- a/jenkins/create_jobs.groovy +++ b/jenkins/create_jobs.groovy @@ -627,39 +627,39 @@ Unfortunately we often see builds break because of changes/new machines...''') steps { conditionalSteps { condition { - fileExists('/usr', BaseDir.WORKSPACE) - runner('DontRun') - steps { - shell( - '''which svn || true + fileExists('/usr', BaseDir.WORKSPACE) + } + runner('DontRun') + steps { + shell( + '''which svn || true which javac javac -version echo 'Using Ant: ${ant.version} from ${ant.home}' > build.xml ''') - ant { - antInstallation(defaultAnt) - } + ant { + antInstallation(defaultAnt) + } - shell( - '''which mvn || true + shell( + '''which mvn || true mvn -version || true echo '4.0.0org.apache.poibuild-tst1.0.0' > pom.xml ''') - maven { - goals('package') - mavenInstallation(defaultMaven) - } - } - } + maven { + goals('package') + mavenInstallation(defaultMaven) + } + } } conditionalSteps { condition { - fileExists('c:\\windows', BaseDir.WORKSPACE) - runner('DontRun') - steps { - batchFile { - command( - '''@echo off + fileExists('c:\\windows', BaseDir.WORKSPACE) + } + runner('DontRun') + steps { + batchFile( + '''@echo off echo . where javac.exe echo . @@ -667,12 +667,10 @@ javac -version echo . echo ^^^^Using Ant: ${ant.version} from ${ant.home}, ant detected Java ${ant.java.version} (may be different than actual Java sometimes...), using Java: ${java.version}/${java.runtime.version}/${java.vm.version}/${java.vm.name} from ${java.vm.vendor} on ${os.name}: ${os.version}^^^ > build.xml ''') - } - ant { - antInstallation(defaultAntWindows) - } - } - } + ant { + antInstallation(defaultAntWindows) + } + } } } } -- cgit v1.2.3