Skip to content

Commit 7d4cb0c

Browse files
committed
MLE-24892 Fixing issue with parallel config
1 parent ad497c3 commit 7d4cb0c

File tree

2 files changed

+42
-19
lines changed

2 files changed

+42
-19
lines changed

Jenkinsfile

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ def setupDockerMarkLogic(String image) {
2020
echo "Using image: "''' + image + '''
2121
docker pull ''' + image + '''
2222
MARKLOGIC_IMAGE=''' + image + ''' MARKLOGIC_LOGS_VOLUME=marklogicLogs docker compose up -d --build
23-
echo "Waiting for MarkLogic server to initialize."
24-
sleep 60s
2523
export JAVA_HOME=$JAVA_HOME_DIR
2624
export GRADLE_USER_HOME=$WORKSPACE/$GRADLE_DIR
27-
export PATH=$GRADLE_USER_HOME:$JAVA_HOME/bin:$PATH
28-
./gradlew mlTestConnections
25+
export PATH=$JAVA_HOME/bin:$PATH
26+
./gradlew -i mlWaitTillReady
27+
sleep 3
28+
./gradlew -i mlWaitTillReady
29+
./gradlew mlTestConnections
2930
./gradlew -i mlDeploy mlReloadSchemas
3031
'''
3132
}
@@ -161,7 +162,7 @@ def tearDownDocker() {
161162
}
162163

163164
pipeline {
164-
agent { label 'javaClientLinuxPool' }
165+
agent none
165166

166167
options {
167168
checkoutToSubdirectory 'java-client-api'
@@ -184,6 +185,7 @@ pipeline {
184185
stages {
185186

186187
stage('pull-request-tests') {
188+
agent { label 'javaClientLinuxPool' }
187189
when {
188190
not {
189191
expression { return params.regressions }
@@ -219,7 +221,9 @@ pipeline {
219221
}
220222
}
221223
}
224+
222225
stage('publish') {
226+
agent { label 'javaClientLinuxPool' }
223227
when {
224228
branch 'develop'
225229
not {
@@ -245,28 +249,33 @@ pipeline {
245249
expression { return params.regressions }
246250
}
247251
}
248-
steps {
249-
script {
250-
def imageTags = params.MARKLOGIC_IMAGE_TAGS.split(',')
251-
def imagePrefix = 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/'
252252

253-
def parallelStages = [:]
254-
imageTags.each { tag ->
253+
steps {
254+
script {
255+
def imageTags = params.MARKLOGIC_IMAGE_TAGS.split(',')
256+
def imagePrefix = 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/'
257+
258+
def parallelStages = [:]
259+
260+
imageTags.each { tag ->
255261
def fullImage = imagePrefix + tag.trim()
256262
def stageName = "regressions-${tag.trim().replace(':', '-')}"
257263

258264
parallelStages[stageName] = {
259-
stage(stageName) {
260-
try {
261-
runTests(fullImage)
262-
} finally {
263-
junit '**/build/**/TEST*.xml'
264-
updateWorkspacePermissions()
265-
tearDownDocker()
265+
node('javaClientLinuxPool') {
266+
stage(stageName) {
267+
try {
268+
runTests(fullImage)
269+
} finally {
270+
junit '**/build/**/TEST*.xml'
271+
updateWorkspacePermissions()
272+
tearDownDocker()
273+
}
266274
}
267275
}
268276
}
269277
}
278+
270279
parallel parallelStages
271280
}
272281
}

test-app/build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,26 @@
22
* Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
33
*/
44

5+
buildscript {
6+
repositories {
7+
mavenCentral()
8+
// Needed for ml-gradle 6.2-SNAPSHOT
9+
maven {
10+
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
11+
}
12+
}
13+
dependencies {
14+
classpath "com.marklogic:ml-gradle:6.2-SNAPSHOT"
15+
}
16+
}
17+
518
plugins {
619
id "net.saliman.properties" version "1.5.2"
7-
id 'com.marklogic.ml-gradle' version '6.1.0'
820
id "com.github.psxpaul.execfork" version "0.2.2"
921
}
1022

23+
apply plugin: "com.marklogic.ml-gradle"
24+
1125
dependencies {
1226
implementation "io.undertow:undertow-core:2.3.20.Final"
1327
implementation "io.undertow:undertow-servlet:2.3.20.Final"

0 commit comments

Comments
 (0)