Skip to content

Commit 3e40193

Browse files
authored
Do not override NUM_MACHINES when CLOUD_PROVIDER is set to EBC (#6405)
Signed-off-by: Lan Xia <[email protected]>
1 parent 69187aa commit 3e40193

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

buildenv/jenkins/JenkinsfileBase

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def setupParallelEnv() {
239239
String PARALLEL_OPTIONS_TEMP = PARALLEL_OPTIONS
240240
PARALLEL_OPTIONS += " TEST_TIME=${params.TEST_TIME} NUM_MACHINES="
241241
NUM_LIST = genParallelList(PARALLEL_OPTIONS)
242-
if (NUM_LIST > MAX_NUM_MACHINES) {
242+
if (NUM_LIST > MAX_NUM_MACHINES && params.CLOUD_PROVIDER != "EBC") {
243243
echo "TEST_TIME (${params.TEST_TIME} minutes) is not possible as it exceeds the machine limit."
244244
echo "Regenerate parallel list with NUM_MACHINES=${MAX_NUM_MACHINES}."
245245
PARALLEL_OPTIONS = PARALLEL_OPTIONS_TEMP + " NUM_MACHINES=${MAX_NUM_MACHINES} TEST_TIME="
@@ -365,13 +365,17 @@ def genParallelList(PARALLEL_OPTIONS) {
365365
// num cannot be greater than machines limit
366366
def getNumMachines() {
367367
int num = params.NUM_MACHINES ? params.NUM_MACHINES.toInteger() : 1
368-
int limit = getMachineLimit()
369-
echo "machine limit is ${limit}"
370-
if (num > limit) {
371-
echo "Number of machines cannot be greater than ${limit}. Set num to ${limit}"
372-
num = limit
368+
if (params.CLOUD_PROVIDER == "EBC") {
369+
return num
370+
} else {
371+
int limit = getMachineLimit()
372+
echo "machine limit is ${limit}"
373+
if (num > limit) {
374+
echo "Number of machines cannot be greater than ${limit}. Set num to ${limit}"
375+
num = limit
376+
}
377+
return num
373378
}
374-
return num
375379
}
376380

377381
def getMachineLimit(){

0 commit comments

Comments
 (0)