-
Notifications
You must be signed in to change notification settings - Fork 52
MLE-26079 Trying to dynamically define regression stages #1055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| options { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -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
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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
AI
Jan 29, 2026
There was a problem hiding this comment.
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.
| def stageName = "regressions-${tag.trim().replace(':', '-')}" | |
| def stageName = "regressions-${tag.trim().replaceAll('[^A-Za-z0-9_.-]', '-')}" |
There was a problem hiding this comment.
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.'