You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2018/10/02 08:15:41 UTC

svn commit: r1842599 - /poi/trunk/jenkins/create_jobs.groovy

Author: fanningpj
Date: Tue Oct  2 08:15:41 2018
New Revision: 1842599

URL: http://svn.apache.org/viewvc?rev=1842599&view=rev
Log:
try to set up xmlbeans build

Modified:
    poi/trunk/jenkins/create_jobs.groovy

Modified: poi/trunk/jenkins/create_jobs.groovy
URL: http://svn.apache.org/viewvc/poi/trunk/jenkins/create_jobs.groovy?rev=1842599&r1=1842598&r2=1842599&view=diff
==============================================================================
--- poi/trunk/jenkins/create_jobs.groovy (original)
+++ poi/trunk/jenkins/create_jobs.groovy Tue Oct  2 08:15:41 2018
@@ -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 xmlbeansSvnBase = 'https://svn.apache.org/repos/asf/xmlbeans/trunk'
+
 def defaultJdk = '1.8'
 def defaultTrigger = 'H/15 * * * *'     // check SCM every 60/15 = 4 minutes
 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 jdkMapping = [
+        '1.6': 'JDK 1.6 (latest)',
         '1.8': 'JDK 1.8 (latest)',
         '1.10': 'JDK 10 (latest)',
         '1.11': 'JDK 11 (latest)',
@@ -427,6 +435,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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org