From 7d4cb0ce9e6062dce0750ad8ba6911e24526e73b Mon Sep 17 00:00:00 2001 From: Rob Rudin Date: Tue, 18 Nov 2025 08:29:03 -0500 Subject: [PATCH] MLE-24892 Fixing issue with parallel config --- Jenkinsfile | 45 ++++++++++++++++++++++++++----------------- test-app/build.gradle | 16 ++++++++++++++- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9226f1613..ef1af8976 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,12 +20,13 @@ def setupDockerMarkLogic(String image) { echo "Using image: "''' + image + ''' docker pull ''' + image + ''' MARKLOGIC_IMAGE=''' + image + ''' MARKLOGIC_LOGS_VOLUME=marklogicLogs docker compose up -d --build - echo "Waiting for MarkLogic server to initialize." - sleep 60s export JAVA_HOME=$JAVA_HOME_DIR export GRADLE_USER_HOME=$WORKSPACE/$GRADLE_DIR - export PATH=$GRADLE_USER_HOME:$JAVA_HOME/bin:$PATH - ./gradlew mlTestConnections + export PATH=$JAVA_HOME/bin:$PATH + ./gradlew -i mlWaitTillReady + sleep 3 + ./gradlew -i mlWaitTillReady + ./gradlew mlTestConnections ./gradlew -i mlDeploy mlReloadSchemas ''' } @@ -161,7 +162,7 @@ def tearDownDocker() { } pipeline { - agent { label 'javaClientLinuxPool' } + agent none options { checkoutToSubdirectory 'java-client-api' @@ -184,6 +185,7 @@ pipeline { stages { stage('pull-request-tests') { + agent { label 'javaClientLinuxPool' } when { not { expression { return params.regressions } @@ -219,7 +221,9 @@ pipeline { } } } + stage('publish') { + agent { label 'javaClientLinuxPool' } when { branch 'develop' not { @@ -245,28 +249,33 @@ pipeline { expression { return params.regressions } } } - steps { - script { - def imageTags = params.MARKLOGIC_IMAGE_TAGS.split(',') - def imagePrefix = 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/' - def parallelStages = [:] - imageTags.each { tag -> + steps { + script { + def imageTags = params.MARKLOGIC_IMAGE_TAGS.split(',') + def imagePrefix = 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/' + + def parallelStages = [:] + + imageTags.each { tag -> def fullImage = imagePrefix + tag.trim() def stageName = "regressions-${tag.trim().replace(':', '-')}" parallelStages[stageName] = { - stage(stageName) { - try { - runTests(fullImage) - } finally { - junit '**/build/**/TEST*.xml' - updateWorkspacePermissions() - tearDownDocker() + node('javaClientLinuxPool') { + stage(stageName) { + try { + runTests(fullImage) + } finally { + junit '**/build/**/TEST*.xml' + updateWorkspacePermissions() + tearDownDocker() + } } } } } + parallel parallelStages } } diff --git a/test-app/build.gradle b/test-app/build.gradle index f60f7b413..80a907488 100644 --- a/test-app/build.gradle +++ b/test-app/build.gradle @@ -2,12 +2,26 @@ * Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved. */ +buildscript { + repositories { + mavenCentral() + // Needed for ml-gradle 6.2-SNAPSHOT + maven { + url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/" + } + } + dependencies { + classpath "com.marklogic:ml-gradle:6.2-SNAPSHOT" + } +} + plugins { id "net.saliman.properties" version "1.5.2" - id 'com.marklogic.ml-gradle' version '6.1.0' id "com.github.psxpaul.execfork" version "0.2.2" } +apply plugin: "com.marklogic.ml-gradle" + dependencies { implementation "io.undertow:undertow-core:2.3.20.Final" implementation "io.undertow:undertow-servlet:2.3.20.Final"