Migrate JOB DSL to new Jenkins environment ci-builds.apache.org

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880889 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2020-08-16 09:51:23 +00:00
parent 393301b8b5
commit 0ce32248c0
1 changed files with 25 additions and 17 deletions

View File

@ -213,7 +213,7 @@ poijobs.each { poijob ->
def slaves = poijob.slaves ?: defaultSlaves + (poijob.slaveAdd ?: '') def slaves = poijob.slaves ?: defaultSlaves + (poijob.slaveAdd ?: '')
def antRT = poijob.windows ? defaultAntWindows : defaultAnt def antRT = poijob.windows ? defaultAntWindows : defaultAnt
job(poijob.name) { job('POI/' + poijob.name) {
if (poijob.disabled) { if (poijob.disabled) {
disabled() disabled()
} }
@ -233,6 +233,7 @@ poijobs.each { poijob ->
} }
env('FORREST_HOME', poijob.windows ? 'f:\\jenkins\\tools\\forrest\\latest' : '/home/jenkins/tools/forrest/latest') env('FORREST_HOME', poijob.windows ? 'f:\\jenkins\\tools\\forrest\\latest' : '/home/jenkins/tools/forrest/latest')
} }
wrappers { wrappers {
timeout { timeout {
absolute(180) absolute(180)
@ -287,13 +288,14 @@ poijobs.each { poijob ->
stringParam('sha1', 'origin/pr/9/head', 'Provide a branch-spec, e.g. origin/pr/9/head') stringParam('sha1', 'origin/pr/9/head', 'Provide a branch-spec, e.g. origin/pr/9/head')
} }
triggers { triggers {
githubPullRequest { pullRequestBuildTrigger()
/*githubPullRequest {
admins(['centic9', 'poi-benchmark', 'tballison', 'gagravarr', 'onealj', 'pjfanning', 'Alain-Bearez']) admins(['centic9', 'poi-benchmark', 'tballison', 'gagravarr', 'onealj', 'pjfanning', 'Alain-Bearez'])
userWhitelist(['centic9', 'poi-benchmark', 'tballison', 'gagravarr', 'onealj', 'pjfanning', 'Alain-Bearez']) userWhitelist(['centic9', 'poi-benchmark', 'tballison', 'gagravarr', 'onealj', 'pjfanning', 'Alain-Bearez'])
orgWhitelist(['apache']) orgWhitelist(['apache'])
cron('H/5 * * * *') cron('H/5 * * * *')
triggerPhrase('OK to test') triggerPhrase('OK to test')
} }*/
} }
} else { } else {
triggers { triggers {
@ -446,7 +448,7 @@ poijobs.each { poijob ->
publishers { publishers {
recordIssues { recordIssues {
tools { tools {
spotbugs { spotBugs {
pattern('build/findbugs.xml') pattern('build/findbugs.xml')
reportEncoding('UTF-8') reportEncoding('UTF-8')
} }
@ -477,6 +479,16 @@ poijobs.each { poijob ->
mailer(email, false, false) mailer(email, false, false)
} }
} }
if (poijob.githubpr) {
configure {
it / 'properties' << 'com.cloudbees.jenkins.plugins.git.vmerge.JobPropertyImpl'(plugin: 'git-validated-merge') {
credentialsId('ASF_Cloudbees_Jenkins_ci-builds')
postBuildPushFailureHandler(class: 'com.cloudbees.jenkins.plugins.git.vmerge.pbph.PushFailureIsFailure')
}
}
}
} }
} }
@ -487,7 +499,7 @@ xmlbeansjobs.each { xjob ->
def slaves = xjob.slaves ?: defaultSlaves + (xjob.slaveAdd ?: '') def slaves = xjob.slaves ?: defaultSlaves + (xjob.slaveAdd ?: '')
def antRT = xjob.windows ? defaultAntWindows : defaultAnt def antRT = xjob.windows ? defaultAntWindows : defaultAnt
job(xjob.name) { job('POI/' + xjob.name) {
if (xjob.disabled) { if (xjob.disabled) {
disabled() disabled()
} }
@ -574,7 +586,7 @@ Add a special job which spans a two-dimensional matrix of all JDKs that we want
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
on that machine correctly. on that machine correctly.
*/ */
matrixJob('POI-DSL-Test-Environment') { matrixJob('POI/POI-DSL-Test-Environment') {
description( description(
'''Check installed version of Java/Ant on all build-nodes '''Check installed version of Java/Ant on all build-nodes
@ -601,11 +613,7 @@ Unfortunately we often see builds break because of changes/new machines...''')
'JDK 14 (latest)', 'JDK 14 (latest)',
'JDK 15 (latest)' 'JDK 15 (latest)'
) )
elasticAxis { label('Nodes','H25','H29','H31','H34','H35','H36','H39','H42','H43','H44','H48','H50','lucene1','lucene2','master')
name('Nodes')
labelString('!cloud-slave&&!H15&&!H17&&!H18&&!H24&&!ubuntu-4&&!H21&&!H35&&!websites1&&!couchdb&&!plc4x&&!ppc64le')
ignoreOffline(true)
}
} }
steps { steps {
conditionalSteps { conditionalSteps {