Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
538adb4
deactivate pushing to Perf team
rwinieski Jul 31, 2025
a8178bf
Merge pull request #376 from marklogic/MLE-23145/Deactivate-Perf-repo
rwinieski Jul 31, 2025
6ec1a84
Update base image dependencies
Aug 1, 2025
70c144e
Merge pull request #377 from vitalykorolev/MLE-23334_sqlite-libs_vuln…
vitalykorolev Aug 1, 2025
5ea41ef
Update MarkLogic RPM version and make 12 the new default
vitalykorolev Aug 4, 2025
7f68a7f
Merge pull request #378 from vitalykorolev/MLE-23373_update-ml12-version
vitalykorolev Aug 4, 2025
dca42e7
Remove microdnf update and switch from libstdc++.i686 to libstdc++
Aug 7, 2025
ea22394
revert update step and update to latest libnsl
Aug 11, 2025
e2840ce
Merge pull request #380 from vitalykorolev/MLE-23418_update-dependenc…
vitalykorolev Aug 11, 2025
a80bf97
MLE-22920: Stablize docker regression test for dynamic hosts.
yyang-progress Aug 11, 2025
ee74155
Merge pull request #381 from yyang-progress/MLE-22920
vitalykorolev Aug 11, 2025
fe9b1c4
Add conditional ML10 dependency
Aug 20, 2025
3b24fee
Merge pull request #383 from vitalykorolev/MLE-23379_update-ml10-deps
vitalykorolev Aug 20, 2025
d440895
make startup script more robust in high latency environment
Aug 22, 2025
33cb82d
add ML version to blackDuck parameters
Aug 27, 2025
a0f72c7
simplify timing and prioritiz ML12 in scheduled builds
Aug 27, 2025
b4ece3c
move timestamp in place of "nightly"
Aug 27, 2025
f9db069
fix pipeline syntax
Aug 28, 2025
856a96c
Merge pull request #384 from vitalykorolev/MLE-23751_minor-pipeline-u…
vitalykorolev Aug 29, 2025
15f86d8
Update comments
Sep 6, 2025
77f9cf6
Merge branch 'develop' into MLE-22761_docker-init-fix
vitalykorolev Sep 8, 2025
0031554
Merge pull request #382 from vitalykorolev/MLE-22761_docker-init-fix
vitalykorolev Sep 8, 2025
8c1233d
Update UBI base version to the latest
Sep 21, 2025
6190025
Merge pull request #389 from vitalykorolev/MLE-24394_update-ubi-versions
vitalykorolev Sep 22, 2025
5924e16
updating release version 2.2.1 in develop branch
barkhachoithani Sep 22, 2025
a21d27a
Merge pull request #390 from barkhachoithani/bugfix/MLE-24406
barkhachoithani Sep 22, 2025
f636524
updated docker version for 2.2.2
barkhachoithani Sep 24, 2025
cdf6da7
Merge pull request #391 from barkhachoithani/feature/MLE-23629
barkhachoithani Sep 25, 2025
2b37efe
Merge pull request #392 from marklogic/release/docker-2.2.2
barkhachoithani Sep 25, 2025
7c526b0
resolved conflicts
barkhachoithani Oct 7, 2025
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
72 changes: 39 additions & 33 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ LINT_OUTPUT = ''
SCAN_OUTPUT = ''
IMAGE_SIZE = 0
RPMversion = ''
TIMESTAMP = new Date().format('yyyyMMdd')

// Define local funtions

Expand Down Expand Up @@ -198,7 +197,7 @@ void copyRPMs() {
else if (marklogicVersion == "12") {
RPMsuffix = ".nightly-rhel"
RPMbranch = "b12"
RPMversion = "12.0"
RPMversion = "12.1"
}
else {
error "Invalid value in marklogicVersion parameter."
Expand Down Expand Up @@ -235,6 +234,8 @@ void buildDockerImage() {
publishImage="marklogic/marklogic-server-${dockerImageType}:${marklogicVersion}-${env.dockerImageType}"
mlVerShort=marklogicVersion.split("\\.")[0]
latestTag="marklogic/marklogic-server-${dockerImageType}:latest-${mlVerShort}"
timeStamp = new Date().format('yyyyMMdd')
timestamptedTag = builtImage.replace('nightly', timeStamp)
sh "make build docker_image_type=${dockerImageType} dockerTag=${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion} marklogicVersion=${marklogicVersion} dockerVersion=${env.dockerVersion} build_branch=${env.BRANCH_NAME} package=${RPM} converters=${CONVERTERS}"
currentBuild.displayName = "#${BUILD_NUMBER}: ${marklogicVersion}-${env.dockerImageType} (${env.dockerVersion})"
}
Expand Down Expand Up @@ -280,7 +281,7 @@ void structureTests() {
* Runs Docker functional tests using the 'make docker-tests' target.
*/
void dockerTests() {
sh "make docker-tests current_image=marklogic/marklogic-server-${dockerImageType}:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion} upgrade_image=${upgradeDockerImage} marklogicVersion=${marklogicVersion} build_branch=${env.BRANCH_NAME} dockerVersion=${env.dockerVersion} docker_image_type=${dockerImageType}"
sh "make docker-tests current_image=marklogic/marklogic-server-${dockerImageType}:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion} upgrade_image=${upgradeDockerImage} marklogicVersion=${marklogicVersion} build_branch=${env.BRANCH_NAME} dockerVersion=${env.dockerVersion} docker_image_type=${dockerImageType} DOCKER_TEST_LIST=\"${params.DOCKER_TEST_LIST}\""
}

/**
Expand Down Expand Up @@ -335,31 +336,32 @@ void publishToInternalRegistry() {
docker tag ${builtImage} ${dockerRegistry}/${builtImage}
docker tag ${builtImage} ${dockerRegistry}/${publishImage}
docker tag ${builtImage} ${dockerRegistry}/${latestTag}
docker tag ${builtImage} ${dockerRegistry}/${builtImage}-${TIMESTAMP}
docker tag ${builtImage} ${dockerRegistry}/${timestamptedTag}
docker push ${dockerRegistry}/${builtImage}
docker push ${dockerRegistry}/${publishImage}
docker push ${dockerRegistry}/${latestTag}
docker push ${dockerRegistry}/${builtImage}-${TIMESTAMP}
docker push ${dockerRegistry}/${timestamptedTag}
"""

}
// Publish to private ECR repository that is used by the performance team. (only ML11)
if ( params.marklogicVersion == "11" ) {
withCredentials( [[
$class: 'AmazonWebServicesCredentialsBinding',
credentialsId: "aws-engineering-ct-ecr",
accessKeyVariable: 'AWS_ACCESS_KEY_ID',
secretKeyVariable: 'AWS_SECRET_ACCESS_KEY'
]]) {
sh """
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 713759029616.dkr.ecr.us-west-2.amazonaws.com
docker tag ${builtImage} 713759029616.dkr.ecr.us-west-2.amazonaws.com/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion}
docker tag ${builtImage} 713759029616.dkr.ecr.us-west-2.amazonaws.com/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}
docker push 713759029616.dkr.ecr.us-west-2.amazonaws.com/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion}
docker push 713759029616.dkr.ecr.us-west-2.amazonaws.com/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}
"""
}
}
// (disabled since it's not needed)
// if ( params.marklogicVersion == "11" ) {
// withCredentials( [[
// $class: 'AmazonWebServicesCredentialsBinding',
// credentialsId: "aws-engineering-ct-ecr",
// accessKeyVariable: 'AWS_ACCESS_KEY_ID',
// secretKeyVariable: 'AWS_SECRET_ACCESS_KEY'
// ]]) {
// sh """
// aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 713759029616.dkr.ecr.us-west-2.amazonaws.com
// docker tag ${builtImage} 713759029616.dkr.ecr.us-west-2.amazonaws.com/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion}
// docker tag ${builtImage} 713759029616.dkr.ecr.us-west-2.amazonaws.com/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}
// docker push 713759029616.dkr.ecr.us-west-2.amazonaws.com/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}-${env.dockerVersion}
// docker push 713759029616.dkr.ecr.us-west-2.amazonaws.com/ml-docker-nightly:${marklogicVersion}-${env.dockerImageType}
// """
// }
// }

// Publish to private ACR Sandbox repository that is used by PDC. (only ML12)
if ( params.marklogicVersion == "12" ) {
Expand All @@ -381,7 +383,7 @@ void publishToInternalRegistry() {
* Runs asynchronously (wait: false).
*/
void scanWithBlackDuck() {
build job: 'securityscans/Blackduck/KubeNinjas/docker', wait: false, parameters: [ string(name: 'branch', value: "${env.BRANCH_NAME}"), string(name: 'CONTAINER_IMAGES', value: "${dockerRegistry}/${publishImage}") ]
build job: 'securityscans/Blackduck/KubeNinjas/docker', wait: false, parameters: [ string(name: 'BRANCH', value: "${env.BRANCH_NAME}"), string(name: 'CONTAINER_IMAGES', value: "${dockerRegistry}/${publishImage}"), string(name: 'ML_VER', value: "${params.marklogicVersion}") ]
}

/**
Expand Down Expand Up @@ -436,32 +438,36 @@ pipeline {
// Trigger nightly builds on the develop branch for every supported version of MarkLogic
// and for every supported image type.
// Include SCAP scan for rootless images
parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 02 * * * % marklogicVersion=10;dockerImageType=ubi
00 02 * * * % marklogicVersion=10;dockerImageType=ubi-rootless;SCAP_SCAN=true
00 02 * * * % marklogicVersion=11;dockerImageType=ubi
30 02 * * * % marklogicVersion=11;dockerImageType=ubi-rootless;SCAP_SCAN=true
30 02 * * * % marklogicVersion=12;dockerImageType=ubi
30 02 * * * % marklogicVersion=12;dockerImageType=ubi-rootless;SCAP_SCAN=true
parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 04 * * * % marklogicVersion=10;dockerImageType=ubi
00 04 * * * % marklogicVersion=10;dockerImageType=ubi-rootless;SCAP_SCAN=true
00 03 * * * % marklogicVersion=11;dockerImageType=ubi
00 03 * * * % marklogicVersion=11;dockerImageType=ubi-rootless;SCAP_SCAN=true
00 03 * * * % marklogicVersion=11;dockerImageType=ubi9
00 03 * * * % marklogicVersion=11;dockerImageType=ubi9-rootless;SCAP_SCAN=true
00 03 * * * % marklogicVersion=12;dockerImageType=ubi9
30 03 * * * % marklogicVersion=12;dockerImageType=ubi9-rootless;SCAP_SCAN=true''' : '')
00 02 * * * % marklogicVersion=12;dockerImageType=ubi
00 02 * * * % marklogicVersion=12;dockerImageType=ubi-rootless;SCAP_SCAN=true
00 02 * * * % marklogicVersion=12;dockerImageType=ubi9
00 02 * * * % marklogicVersion=12;dockerImageType=ubi9-rootless;SCAP_SCAN=true
00 05 * * 7 % marklogicVersion=10;dockerImageType=ubi;DOCKER_TEST_LIST=Initialized MarkLogic container with latency
30 05 * * 7 % marklogicVersion=11;dockerImageType=ubi;DOCKER_TEST_LIST=Initialized MarkLogic container with latency
00 06 * * 7 % marklogicVersion=12;dockerImageType=ubi;DOCKER_TEST_LIST=Initialized MarkLogic container with latency''' : '')
}
environment {
QA_LICENSE_KEY = credentials('QA_LICENSE_KEY')
}

parameters {
string(name: 'emailList', defaultValue: emailList, description: 'List of email for build notification', trim: true)
string(name: 'dockerVersion', defaultValue: '2.2.1', description: 'ML Docker version. This version along with ML rpm package version will be the image tag as {ML_Version}_{dockerVersion}', trim: true)
string(name: 'dockerVersion', defaultValue: '2.2.2', description: 'ML Docker version. This version along with ML rpm package version will be the image tag as {ML_Version}_{dockerVersion}', trim: true)
choice(name: 'dockerImageType', choices: 'ubi-rootless\nubi\nubi9-rootless\nubi9', description: 'Platform type for Docker image. Will be made part of the docker image tag')
string(name: 'upgradeDockerImage', defaultValue: '', description: 'Docker image for testing upgrades. Defaults to ubi image if left blank.\n Currently upgrading to ubi-rotless is not supported hence the test is skipped when ubi-rootless image is provided.', trim: true)
choice(name: 'marklogicVersion', choices: '11\n12\n10', description: 'MarkLogic Server Branch. used to pick appropriate rpm')
choice(name: 'marklogicVersion', choices: '12\n11\n10', description: 'MarkLogic Server Branch. used to pick appropriate rpm')
string(name: 'ML_RPM', defaultValue: '', description: 'URL for RPM to be used for Image creation. \n If left blank nightly ML rpm will be used.\n Please provide Jenkins accessible path e.g. /project/engineering or /project/qa', trim: true)
string(name: 'ML_CONVERTERS', defaultValue: '', description: 'URL for the converters RPM to be included in the image creation \n If left blank the nightly ML Converters Package will be used.', trim: true)
booleanParam(name: 'PUBLISH_IMAGE', defaultValue: false, description: 'Publish image to internal registry')
booleanParam(name: 'TEST_STRUCTURE', defaultValue: true, description: 'Run container structure tests')
booleanParam(name: 'DOCKER_TESTS', defaultValue: true, description: 'Run docker tests')
booleanParam(name: 'DOCKER_TESTS', defaultValue: true, description: 'Run docker tests')
string(name: 'DOCKER_TEST_LIST', defaultValue: '', description: 'Comma separated list of test names to run (e.g Test one, Test two). Leave empty to run all tests.', trim: true)
booleanParam(name: 'SCAP_SCAN', defaultValue: false, description: 'Run Open SCAP scan on the image.')
}

Expand Down
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,20 @@ docker-tests:
python3 -m venv python_env; \
source ./python_env/bin/activate; \
pip3 install -r requirements.txt; \
robot -x docker-tests.xml --outputdir test_results --randomize all --variable TEST_IMAGE:${current_image} --variable UPGRADE_TEST_IMAGE:${upgrade_image} --variable MARKLOGIC_VERSION:${marklogicVersion} --variable BUILD_BRANCH:${build_branch} --variable MARKLOGIC_DOCKER_VERSION:${dockerVersion} --variable IMAGE_TYPE:${docker_image_type} --maxerrorlines 9999 ./docker-tests.robot; \
TEST_ARGS=""; \
if [ -n "$(DOCKER_TEST_LIST)" ]; then \
echo "$(DOCKER_TEST_LIST)" | sed 's/,/\n/g' | while IFS= read -r ITEM; do \
ITEM=$$(echo "$$ITEM" | sed -e 's/^ *//' -e 's/ *$$//' -e 's/^"//' -e 's/"$$//'); \
[ -n "$$ITEM" ] && echo "--test \"$$ITEM\""; \
done | tr '\n' ' ' > /tmp/test_args; \
TEST_ARGS=$$(cat /tmp/test_args); \
rm -f /tmp/test_args; \
echo "Running selected tests: $(DOCKER_TEST_LIST)"; \
else \
TEST_ARGS="--exclude long_running"; \
echo "Running all tests except those tagged with 'long_running'"; \
fi; \
eval "robot --consolewidth 120 -x docker-tests.xml --outputdir test_results --randomize all --variable TEST_IMAGE:${current_image} --variable UPGRADE_TEST_IMAGE:${upgrade_image} --variable MARKLOGIC_VERSION:${marklogicVersion} --variable BUILD_BRANCH:${build_branch} --variable MARKLOGIC_DOCKER_VERSION:${dockerVersion} --variable IMAGE_TYPE:${docker_image_type} --maxerrorlines 9999 $$TEST_ARGS ./docker-tests.robot"; \
deactivate; \
rm -rf python_env

Expand Down
2 changes: 1 addition & 1 deletion dockerFiles/marklogic-deps-ubi9:base
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
###############################################################

FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6-1754584681
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6-1758184547
LABEL "com.marklogic.maintainer"="docker@marklogic.com"

###############################################################
Expand Down
2 changes: 1 addition & 1 deletion dockerFiles/marklogic-deps-ubi:base
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
###############################################################

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1753978370
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1756195339
LABEL "com.marklogic.maintainer"="docker@marklogic.com"

# MarkLogic version passed from build to enable conditional deps
Expand Down
37 changes: 30 additions & 7 deletions src/scripts/start-marklogic-rootless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ else
error "INSTALL_CONVERTERS must be true or false." exit
fi

N_RETRY=5
# N_RETRY: Number of retries for failed operations (default: 5)
N_RETRY=${N_RETRY:-15}
# RETRY_INTERVAL: Interval in seconds between retries (default: 10)
RETRY_INTERVAL=10
# CURL_TIMEOUT: Timeout in seconds for curl commands (default: 300)
CURL_TIMEOUT=${CURL_TIMEOUT:-300}

################################################################
# restart_check(hostname, baseline_timestamp)
Expand All @@ -117,11 +121,11 @@ RETRY_INTERVAL=10
function restart_check {
info "Waiting for MarkLogic to restart."
local retry_count LAST_START
LAST_START=$(curl -s --anyauth --user "${ML_ADMIN_USERNAME}":"${ML_ADMIN_PASSWORD}" "http://$1:8001/admin/v1/timestamp")
LAST_START=$(curl -s -m "${CURL_TIMEOUT}" --anyauth --user "${ML_ADMIN_USERNAME}":"${ML_ADMIN_PASSWORD}" "http://$1:8001/admin/v1/timestamp")
for ((retry_count = 0; retry_count < N_RETRY; retry_count = retry_count + 1)); do
if [[ "$2" == "${LAST_START}" ]] || [[ -z "${LAST_START}" ]]; then
sleep ${RETRY_INTERVAL}
LAST_START=$(curl -s --anyauth --user "${ML_ADMIN_USERNAME}":"${ML_ADMIN_PASSWORD}" "http://$1:8001/admin/v1/timestamp")
LAST_START=$(curl -s -m "${CURL_TIMEOUT}" --anyauth --user "${ML_ADMIN_USERNAME}":"${ML_ADMIN_PASSWORD}" "http://$1:8001/admin/v1/timestamp")
else
info "MarkLogic has restarted."
return 0
Expand Down Expand Up @@ -178,7 +182,7 @@ function validate_cert {
local cacertfile=$1
local return_code
local curl_output
curl_output=$(curl -s -S -L --cacert "${cacertfile}" --ssl "${ML_BOOTSTRAP_PROTOCOL}"://"${MARKLOGIC_BOOTSTRAP_HOST}":8001 --anyauth --user "${ML_ADMIN_USERNAME}":"${ML_ADMIN_PASSWORD}")
curl_output=$(curl -s -S -L -m "${CURL_TIMEOUT}" --cacert "${cacertfile}" --ssl "${ML_BOOTSTRAP_PROTOCOL}"://"${MARKLOGIC_BOOTSTRAP_HOST}":8001 --anyauth --user "${ML_ADMIN_USERNAME}":"${ML_ADMIN_PASSWORD}")
return_code=$?
if [[ $return_code != 0 ]]; then
info "$curl_output"
Expand All @@ -193,6 +197,8 @@ function validate_cert {
# Use RETRY_INTERVAL to tune the test length.
# Validate that response code is the same as expected response
# code or exit with an error.
# For instance-admin endpoint, implement special retry logic with exponential backoff
# due to network latency issues.
#
# $1 : Flag indicating if the script should exit if the given response code is not received ("true" to exit, "false" to return the response code")
# $2 : The target url to test against
Expand All @@ -206,9 +212,26 @@ function curl_retry_validate {
local expected_response_code=$1; shift
local curl_options=("$@")

# Special case: instance-admin must only be invoked once (non-idempotent)
if [[ "${endpoint}" == *"/admin/v1/instance-admin"* ]]; then
response=$(curl -s -m "${CURL_TIMEOUT}" -w '%{http_code}' "${curl_options[@]}" "$endpoint")
response_code=$(tail -n1 <<< "$response")
response_content=$(sed '$ d' <<< "$response")

if [[ ${response_code} -eq ${expected_response_code} ]]; then
return "${response_code}"
fi

echo "${response_content}" > start-marklogic_curl_retry_validate.log
if [[ "${return_error}" == "false" ]] ; then
return "${response_code}"
fi
[[ -f "start-marklogic_curl_retry_validate.log" ]] && cat start-marklogic_curl_retry_validate.log
error "Expected response code ${expected_response_code}, got ${response_code} from ${endpoint}." exit
fi

for ((retry_count = 0; retry_count < N_RETRY; retry_count = retry_count + 1)); do

response=$(curl -s -m 30 -w '%{http_code}' "${curl_options[@]}" "$endpoint")
response=$(curl -s -m "${CURL_TIMEOUT}" -w '%{http_code}' "${curl_options[@]}" "$endpoint")
response_code=$(tail -n1 <<< "$response")
response_content=$(sed '$ d' <<< "$response")

Expand Down Expand Up @@ -373,7 +396,7 @@ elif [[ "${MARKLOGIC_INIT}" == "true" ]]; then
fi

info "Initializing MarkLogic on ${HOSTNAME}"
TIMESTAMP=$(curl --anyauth -m 30 -s --retry 5 \
TIMESTAMP=$(curl --anyauth -m "${CURL_TIMEOUT}" -s --retry 5 \
-i -X POST -H "Content-type:application/json" \
-d "${LICENSE_PAYLOAD}" \
http://"${HOSTNAME}":8001/admin/v1/init |
Expand Down
Loading
Loading