fix groovy variable scope (#2905)
This commit is contained in:
parent
6f50afde38
commit
27179786a0
|
@ -7,13 +7,13 @@ def oss = ["linux"]
|
||||||
def builds = [:]
|
def builds = [:]
|
||||||
for (def os in oss) {
|
for (def os in oss) {
|
||||||
for (def jdk in jdks) {
|
for (def jdk in jdks) {
|
||||||
builds[os+"_"+jdk] = getFullBuild( jdk, os )
|
builds[os+"_"+jdk] = getFullBuild( jdk, os, mainJdk == jdk )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parallel builds
|
parallel builds
|
||||||
|
|
||||||
def getFullBuild(jdk, os) {
|
def getFullBuild(jdk, os, mainJdk) {
|
||||||
return {
|
return {
|
||||||
node(os) {
|
node(os) {
|
||||||
// System Dependent Locations
|
// System Dependent Locations
|
||||||
|
@ -22,7 +22,7 @@ def getFullBuild(jdk, os) {
|
||||||
def settingsName = 'oss-settings.xml'
|
def settingsName = 'oss-settings.xml'
|
||||||
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
|
def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
|
||||||
|
|
||||||
stage("Build / Test - ${jdk}") {
|
stage("Build / Test - $jdk") {
|
||||||
timeout(time: 120, unit: 'MINUTES') {
|
timeout(time: 120, unit: 'MINUTES') {
|
||||||
// Checkout
|
// Checkout
|
||||||
checkout scm
|
checkout scm
|
||||||
|
@ -41,7 +41,7 @@ def getFullBuild(jdk, os) {
|
||||||
sh "mvn -V -B install -Dmaven.test.failure.ignore=true -T5 -e -Pmongodb -Dunix.socket.tmp=" + env.JENKINS_HOME
|
sh "mvn -V -B install -Dmaven.test.failure.ignore=true -T5 -e -Pmongodb -Dunix.socket.tmp=" + env.JENKINS_HOME
|
||||||
|
|
||||||
// Compact 3 build
|
// Compact 3 build
|
||||||
if (isMainBuild(jdk)) {
|
if (mainJdk) {
|
||||||
sh "mvn -f aggregates/jetty-all-compact3 -V -B -Pcompact3 clean install -T5"
|
sh "mvn -f aggregates/jetty-all-compact3 -V -B -Pcompact3 clean install -T5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ def getFullBuild(jdk, os) {
|
||||||
consoleParsers = [[parserName: 'JavaDoc'],
|
consoleParsers = [[parserName: 'JavaDoc'],
|
||||||
[parserName: 'JavaC']];
|
[parserName: 'JavaC']];
|
||||||
|
|
||||||
if (isMainBuild(jdk)) {
|
if (mainJdk) {
|
||||||
// Collect up the jacoco execution results
|
// Collect up the jacoco execution results
|
||||||
def jacocoExcludes =
|
def jacocoExcludes =
|
||||||
// build tools
|
// build tools
|
||||||
|
@ -85,8 +85,4 @@ def getFullBuild(jdk, os) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def isMainBuild(jdk) {
|
|
||||||
return jdk == "${mainJdk}"
|
|
||||||
}
|
|
||||||
|
|
||||||
// vim: et:ts=2:sw=2:ft=groovy
|
// vim: et:ts=2:sw=2:ft=groovy
|
||||||
|
|
Loading…
Reference in New Issue