try to set up xmlbeans build

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1842599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-10-02 08:15:41 +00:00
parent 72d02f0c1c
commit f4428349c6

View File

@ -101,7 +101,14 @@ def poijobs = [
], ],
] ]
def xmlbeansjobs = [
[ name: 'XMLBeans-DSL-1.6', jdk: '1.6', trigger: 'H */12 * * *', skipcigame: true
]
]
def svnBase = 'https://svn.apache.org/repos/asf/poi/trunk' def svnBase = 'https://svn.apache.org/repos/asf/poi/trunk'
def xmlbeansSvnBase = 'https://svn.apache.org/repos/asf/xmlbeans/trunk'
def defaultJdk = '1.8' def defaultJdk = '1.8'
def defaultTrigger = 'H/15 * * * *' // check SCM every 60/15 = 4 minutes def defaultTrigger = 'H/15 * * * *' // check SCM every 60/15 = 4 minutes
def defaultEmail = 'dev@poi.apache.org' def defaultEmail = 'dev@poi.apache.org'
@ -110,6 +117,7 @@ def defaultAnt = 'Ant 1.9.9'
def defaultSlaves = '(ubuntu||beam)&&!cloud-slave&&!H15&&!H17&&!H18&&!H24&&!ubuntu-4&&!H21' def defaultSlaves = '(ubuntu||beam)&&!cloud-slave&&!H15&&!H17&&!H18&&!H24&&!ubuntu-4&&!H21'
def jdkMapping = [ def jdkMapping = [
'1.6': 'JDK 1.6 (latest)',
'1.8': 'JDK 1.8 (latest)', '1.8': 'JDK 1.8 (latest)',
'1.10': 'JDK 10 (latest)', '1.10': 'JDK 10 (latest)',
'1.11': 'JDK 11 (latest)', '1.11': 'JDK 11 (latest)',
@ -428,6 +436,88 @@ poijobs.each { poijob ->
} }
} }
xmlbeansjobs.each { xjob ->
def jdkKey = xjob.jdk ?: defaultJdk
def trigger = xjob.trigger ?: defaultTrigger
def email = xjob.email ?: defaultEmail
def slaves = xjob.slaves ?: defaultSlaves + (xjob.slaveAdd ?: '')
def antRT = defaultAnt + (xjob.windows ? ' (Windows)' : '')
job(xjob.name) {
if (xjob.disabled) {
disabled()
}
description( defaultDesc + (xjob.apicheck ? apicheckDesc : sonarDesc) )
logRotator {
numToKeep(5)
artifactNumToKeep(1)
}
label(slaves)
environmentVariables {
env('LANG', 'en_US.UTF-8')
if(jdkKey == '1.10') {
// when using JDK 9/10 for running Ant, we need to provide more modules for the forbidden-api-checks task
// on JDK 11 and newer there is no such module any more, so do not add it here
env('ANT_OPTS', '--add-modules=java.xml.bind --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED')
}
env('FORREST_HOME', xjob.windows ? 'f:\\jenkins\\tools\\forrest\\latest' : '/home/jenkins/tools/forrest/latest')
}
wrappers {
timeout {
absolute(180)
abortBuild()
writeDescription('Build was aborted due to timeout')
}
}
jdk(jdkMapping.get(jdkKey))
scm {
svn(xmlbeansSvnBase) { svnNode ->
svnNode / browser(class: 'hudson.scm.browsers.ViewSVN') /
url << 'http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN'
}
}
checkoutRetryCount(3)
triggers {
scm(trigger)
}
def shellcmds = (xjob.windows ? shellCmdsWin : shellCmdsUnix).replace('JOBSHELL', xjob.shell ?: '')
// Create steps and publishers depending on the type of Job that is selected
steps {
shellEx(delegate, shellcmds, xjob)
if(xjob.addShell) {
shellEx(delegate, xjob.addShell, xjob)
}
ant {
targets(['clean'])
antInstallation(antRT)
}
ant {
targets(['checkintest'])
antInstallation(antRT)
}
}
publishers {
archiveArtifacts('build/private/**')
archiveJunit('build/ooxml-test-results/*.xml,build/scratchpad-test-results/*.xml,build/test-results/*.xml,build/excelant-test-results/*.xml,build/integration-test-results/*.xml,build/*/build/test-results/test/TEST-*.xml,build/*/build/test-results/TEST-*.xml') {
testDataPublishers {
publishTestStabilityData()
}
}
if (!xjob.skipcigame) {
configure { project ->
project / publishers << 'hudson.plugins.cigame.GamePublisher' {}
}
}
mailer(email, false, false)
}
}
}
/* /*
Add a special job which spans a two-dimensional matrix of all JDKs that we want to use and Add a special job which spans a two-dimensional matrix of all JDKs that we want to use and
all slaves that we would like to use and test if the java and ant binaries are available all slaves that we would like to use and test if the java and ant binaries are available