Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +26 to +28
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running mlWaitTillReady twice with a 3-second sleep in between suggests uncertainty about initialization completion. If mlWaitTillReady is reliable, a single call should suffice. If not, consider adding timeout/retry logic within the task itself or documenting why two calls are necessary.

Suggested change
./gradlew -i mlWaitTillReady
sleep 3
./gradlew -i mlWaitTillReady
# Only one call to mlWaitTillReady should be sufficient; see Jenkinsfile for details.
./gradlew -i mlWaitTillReady

Copilot uses AI. Check for mistakes.
./gradlew mlTestConnections
./gradlew -i mlDeploy mlReloadSchemas
'''
}
Expand Down Expand Up @@ -161,7 +162,7 @@ def tearDownDocker() {
}

pipeline {
agent { label 'javaClientLinuxPool' }
agent none

options {
checkoutToSubdirectory 'java-client-api'
Expand All @@ -184,6 +185,7 @@ pipeline {
stages {

stage('pull-request-tests') {
agent { label 'javaClientLinuxPool' }
when {
not {
expression { return params.regressions }
Expand Down Expand Up @@ -219,7 +221,9 @@ pipeline {
}
}
}

stage('publish') {
agent { label 'javaClientLinuxPool' }
when {
branch 'develop'
not {
Expand All @@ -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
}
}
Expand Down
16 changes: 15 additions & 1 deletion test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down