Update create_jobs.groovy

This commit is contained in:
PJ Fanning 2025-07-07 22:51:00 +01:00
parent 6928a6ca2e
commit eb91cfad93

View File

@ -132,7 +132,7 @@ def xmlbeansjobs = [
]
def gitBase = 'https://github.com/apache/poi.git'
def xmlbeansSvnBase = 'https://svn.apache.org/repos/asf/xmlbeans/trunk'
def xmlbeansGitBase = 'https://github.com/apache/xmlbeans.git'
def defaultJdk = '1.8'
def defaultTrigger = 'H/15 * * * *' // check SCM every 60/15 = 4 minutes
@ -253,60 +253,6 @@ POIJOBSHELL
:: ignore any error message
exit /b 0'''
def xbShellCmdsUnix =
'''# remove some outdated directories that should not be there any more
rm -rf examples excelant integrationtest main ooxml ooxml-schema scratchpad build.javacheck.xml
# show which files are currently modified in the working copy
svn status || true
# make sure no changed module-class-files or ooxml-lite-report-files are lingering on
svn revert . -R || true
# print out information about which exact version of java we are using
echo Java-Home: $JAVA_HOME
ls -al $JAVA_HOME/
ls -al $JAVA_HOME/bin
$JAVA_HOME/bin/java -version
echo which java
which java
java -version
echo which javac
which javac
javac -version
echo Ant-Home: $ANT_HOME
ls -al $ANT_HOME
echo which ant
which ant || true
ant -version
echo '<project default="test"><target name="test"><echo>Java ${ant.java.version}/${java.version}</echo><exec executable="javac"><arg value="-version"/></exec></target></project>' > build.javacheck.xml
ant -f build.javacheck.xml -v
POIJOBSHELL
# ignore any error message
exit 0'''
def xbShellCmdsWin =
'''@echo off
:: show which files are currently modified in the working copy
svn status
:: make sure no changed module-class-files are lingering on
svn revert . -R
:: print out information about which exact version of java we are using
echo Java-Home: %JAVA_HOME%
dir "%JAVA_HOME:\\\\=\\%"
"%JAVA_HOME%/bin/java" -version
POIJOBSHELL
:: ignore any error message
exit /b 0'''
poijobs.each { poijob ->
def jdkKey = poijob.jdk ?: defaultJdk
def trigger = poijob.trigger ?: defaultTrigger
@ -574,9 +520,11 @@ xmlbeansjobs.each { xjob ->
}
jdk(jdkMapping.get(jdkKey).jenkinsJdk)
scm {
svn(xmlbeansSvnBase) { svnNode ->
svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') /
url << 'https://svn.apache.org/viewcvs.cgi/?root=Apache-SVN'
git {
remote {
url(xmlbeansGitBase)
}
branch('*/trunk')
}
}
checkoutRetryCount(3)
@ -585,7 +533,7 @@ xmlbeansjobs.each { xjob ->
scm(trigger)
}
def shellcmds = (xjob.windows ? xbShellCmdsWin : xbShellCmdsUnix).replace('POIJOBSHELL', xjob.shell ?: '')
def shellcmds = (xjob.windows ? shellCmdsWin : shellCmdsUnix).replace('POIJOBSHELL', xjob.shell ?: '')
// Create steps and publishers depending on the type of Job that is selected
steps {