aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2021-11-07 15:00:07 +0000
committerDominik Stadler <centic@apache.org>2021-11-07 15:00:07 +0000
commitc531f2192f29c0983adcfad41171ff77e385109b (patch)
tree2e5f572c13021c9919af77779b30707536dda0bd
parent761a78b49f37b9bc4d75468bf3d07e25d4800023 (diff)
downloadpoi-c531f2192f29c0983adcfad41171ff77e385109b.tar.gz
poi-c531f2192f29c0983adcfad41171ff77e385109b.zip
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
-rw-r--r--jenkins/create_jobs.groovy54
1 files 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 '<?xml version="1.0"?><project name="POI Build" default="test"><target name="test"><echo>Using Ant: ${ant.version} from ${ant.home}</echo></target></project>' > build.xml
''')
- ant {
- antInstallation(defaultAnt)
- }
+ ant {
+ antInstallation(defaultAnt)
+ }
- shell(
- '''which mvn || true
+ shell(
+ '''which mvn || true
mvn -version || true
echo '<project><modelVersion>4.0.0</modelVersion><groupId>org.apache.poi</groupId><artifactId>build-tst</artifactId><version>1.0.0</version></project>' > 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 ^<?xml version=^"1.0^"?^>^<project name=^"POI Build^" default=^"test^"^>^<target name=^"test^"^>^<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}^</echo^>^</target^>^</project^> > build.xml
''')
- }
- ant {
- antInstallation(defaultAntWindows)
- }
- }
- }
+ ant {
+ antInstallation(defaultAntWindows)
+ }
+ }
}
}
}