Skip to content
Merged
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
89 changes: 30 additions & 59 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ pipeline {

parameters {
booleanParam(name: 'regressions', defaultValue: false, description: 'indicator if build is for regressions')
string(name: 'MARKLOGIC_IMAGE_TAGS', defaultValue: 'marklogic-server-ubi:latest-11,marklogic-server-ubi:latest-12', description: 'Comma-delimited list of MarkLogic image tags including variant (e.g., marklogic-server-ubi:latest-11,marklogic-server-ubi-rootless:11.3.2). The registry/org (ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic) path will be prepended automatically.')
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The parameter description is lengthy and may be truncated in the Jenkins UI. Consider moving the detailed explanation to pipeline documentation and keeping the description concise, such as: 'Comma-delimited list of MarkLogic image tags (e.g., marklogic-server-ubi:latest-11). Registry path is prepended automatically.'

Suggested change
string(name: 'MARKLOGIC_IMAGE_TAGS', defaultValue: 'marklogic-server-ubi:latest-11,marklogic-server-ubi:latest-12', description: 'Comma-delimited list of MarkLogic image tags including variant (e.g., marklogic-server-ubi:latest-11,marklogic-server-ubi-rootless:11.3.2). The registry/org (ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic) path will be prepended automatically.')
string(name: 'MARKLOGIC_IMAGE_TAGS', defaultValue: 'marklogic-server-ubi:latest-11,marklogic-server-ubi:latest-12', description: 'Comma-delimited list of MarkLogic image tags (e.g., marklogic-server-ubi:latest-11). Registry path is prepended automatically.')

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The default value excludes latest-10 which was previously tested in the removed 'runtests-10-nightly' stage. If version 10 testing is still required, consider including 'marklogic-server-ubi:latest-10' in the default value or document why it was intentionally removed.

Copilot uses AI. Check for mistakes.
}

options {
Expand Down Expand Up @@ -166,69 +167,39 @@ pipeline {
}

stage('regressions') {
parallel {

stage('runtests-11-nightly') {
when {
allOf {
branch 'develop'
expression { return params.regressions }
}
}
agent { label 'nodeclientpool' }
steps {
runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-11')
runTests(false)
runTypeScriptTests()
runE2ETests(false)
}
post {
always {
teardownAfterTests()
}
}
when {
allOf {
branch 'develop'
expression { return params.regressions }
}

stage('runtests-12-nightly') {
when {
allOf {
branch 'develop'
expression { return params.regressions }
}
}
agent { label 'nodeclientpool' }
steps {
runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-12')
runTests(false)
runTypeScriptTests()
runE2ETests(false)
}
post {
always {
teardownAfterTests()
}
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(':', '-')}"
Comment on lines +178 to +184
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

If the MARKLOGIC_IMAGE_TAGS parameter is empty or contains only whitespace, split(',') will return an array with an empty string, causing the pipeline to create an invalid stage. Add validation to check if the parameter is empty or only contains whitespace before processing.

Suggested change
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(':', '-')}"
def imageTagsParam = params.MARKLOGIC_IMAGE_TAGS
if (!imageTagsParam || imageTagsParam.trim().isEmpty()) {
error "MARKLOGIC_IMAGE_TAGS parameter must not be empty or whitespace-only when running regressions."
}
def imageTags = imageTagsParam
.split(',')
.collect { it.trim() }
.findAll { it }
if (imageTags.isEmpty()) {
error "No valid image tags were found in MARKLOGIC_IMAGE_TAGS after processing. Please provide at least one non-empty, comma-separated tag."
}
def imagePrefix = 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/'
def parallelStages = [:]
imageTags.each { tag ->
def fullImage = imagePrefix + tag
def stageName = "regressions-${tag.replace(':', '-')}"

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The stage name generation replaces colons with hyphens but doesn't handle other potentially problematic characters that might appear in image tags (e.g., slashes, special characters). Consider using a more robust sanitization approach or documenting the expected format constraints for the image tags.

Suggested change
def stageName = "regressions-${tag.trim().replace(':', '-')}"
def stageName = "regressions-${tag.trim().replaceAll('[^A-Za-z0-9_.-]', '-')}"

Copilot uses AI. Check for mistakes.

parallelStages[stageName] = {
stage(stageName) {
node('nodeclientpool') {
try {
runDockerCompose(fullImage)
runTests(false)
runTypeScriptTests()
runE2ETests(false)
} finally {
teardownAfterTests()
}
}
}
}
}
}

stage('runtests-10-nightly') {
when {
allOf {
branch 'develop'
expression { return params.regressions }
}
}
agent { label 'nodeclientpool' }
steps {
runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-10')
runTests(false)
runTypeScriptTests()
runE2ETests(false)
}
post {
always {
teardownAfterTests()
}
}
parallel parallelStages
}
}
}
Expand Down