From 2dd9ba4479865e83630c184244105676248c945d Mon Sep 17 00:00:00 2001 From: Vitaly Korolev Date: Mon, 28 Sep 2026 12:39:03 -0700 Subject: [PATCH 1/2] MLE-32821: Fix Docker pipeline issues --- Jenkinsfile | 4 ++-- Makefile | 2 +- README.md | 24 ++++++++---------------- test/compose-2node-bootstrap-only.yaml | 2 +- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 49d1dea6..ff99bc32 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -170,7 +170,7 @@ def getReviewState() { */ void resultNotification(status) { def paramEmailList = params.emailList?.trim() - def needSecList = params.SCAP_SCAN && BRANCH_NAME == 'develop' + def needSecList = params.SCAP_SCAN && env.BRANCH_NAME == 'develop' def emailConfig = (!paramEmailList || needSecList) ? loadEmailConfig() : null def baseEmailList = paramEmailList ?: emailConfig.emailList def emailSecList = emailConfig?.emailSecList ?: '' @@ -198,7 +198,7 @@ void resultNotification(status) { } if (params.SCAP_SCAN) { email_body = "${email_body} SCAP Scan Report
" - if ( BRANCH_NAME == 'develop' ) { + if ( env.BRANCH_NAME == 'develop' ) { emailList = emailList+','+emailSecList } } else { diff --git a/Makefile b/Makefile index 7ce23fdb..ea608a95 100644 --- a/Makefile +++ b/Makefile @@ -96,8 +96,8 @@ docker-test-ids: @awk 'BEGIN{in_tests=0} /^\*\*\* Test Cases \*\*\*/{in_tests=1;next} /^\*\*\*/{if(in_tests)exit} in_tests && /^[DC][0-9][0-9] /{print " - " $$0}' ./test/docker-tests.robot docker-tests: - cd test; \ $(MAKE) -s docker-test-ids; \ + cd test; \ python3 -m venv python_env; \ source ./python_env/bin/activate; \ pip3 install -r requirements.txt; \ diff --git a/README.md b/README.md index 78e817c1..32b40c5a 100644 --- a/README.md +++ b/README.md @@ -78,11 +78,10 @@ With this image, you have the option to either create an initialized or an unini ## Initialized MarkLogic Server For an initialized MarkLogic Server, admin credentials are required to be passed in while creating the Docker container. The Docker container will have MarkLogic Server installed and initialized, and databases and app servers created. A security database will be created to store user data, roles, and other security information. MarkLogic Server credentials, passed in as environment variable parameters while running a container, will be stored as part of the admin user in the security database. These admin credentials can be used to access MarkLogic Server Admin interface on port 8001 and other app servers with their respective ports. -To create an initialized MarkLogic Server, pass in the environment variables MARKLOGIC_ADMIN_USERNAME and MARKLOGIC_ADMIN_PASSWORD, and replace {insert admin username}/{insert admin password} with actual values for admin credentials. Use the optional environment variable MARKLOGIC_WALLET_PASSWORD and REALM to set the wallet password and authentication realm of the admin user. If not provided, the wallet-password will default to the value set for admin-password and realm will be set to public. Optionally, you can pass license information in `{insert license}`/`{insert licensee}` to apply your MarkLogic license. To do this, run this this command: +To create an initialized MarkLogic Server, pass in the environment variables MARKLOGIC_ADMIN_USERNAME and MARKLOGIC_ADMIN_PASSWORD, and replace {insert admin username}/{insert admin password} with actual values for admin credentials. Use the optional environment variable MARKLOGIC_WALLET_PASSWORD and REALM to set the wallet password and authentication realm of the admin user. If not provided, the wallet-password will default to the value set for admin-password and realm will be set to public. Optionally, you can pass license information in `{insert license}`/`{insert licensee}` to apply your MarkLogic license. To do this, run this this command. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details): ```bash $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ - # --cap-add=SYS_PTRACE \ (see "Enabling Stack Trace Generation" section below for details) -e MARKLOGIC_INIT=true \ -e MARKLOGIC_ADMIN_USERNAME={insert admin username} \ -e MARKLOGIC_ADMIN_PASSWORD={insert admin password} \ @@ -93,11 +92,10 @@ $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ progressofficial/marklogic-db ``` -Example run: +Example run (optionally add the `--cap-add=SYS_PTRACE` flag as described in the "Enabling Stack Trace Generation" section below): ```bash $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ - # --cap-add=SYS_PTRACE \ (see "Enabling Stack Trace Generation" section below for details) -e MARKLOGIC_INIT=true \ -e MARKLOGIC_ADMIN_USERNAME='admin' \ -e MARKLOGIC_ADMIN_PASSWORD='Areally!PowerfulPassword1337' \ @@ -109,11 +107,10 @@ Wait about a minute for MarkLogic Server to initialize before checking the ports ## Uninitialized MarkLogic Server For an uninitialized MarkLogic Server, admin credentials or license information are not required while creating the container. The Docker container will have MarkLogic Server installed and ports exposed for app servers as specified in the run command. Users can access the MarkLogic Admin Interface at http://localhost:8001 and manually initialize the MarkLogic Server, create the admin user, databases, and install the license. See the MarkLogic Installation documentation [here](https://docs.marklogic.com/guide/installation/procedures#id_84772). -To create an uninitialized MarkLogic Server with [Docker CLI](https://docs.docker.com/engine/reference/commandline/cli/), run this command: +To create an uninitialized MarkLogic Server with [Docker CLI](https://docs.docker.com/engine/reference/commandline/cli/), run this command. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details): ```bash $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ - # --cap-add=SYS_PTRACE \ (see "Enabling Stack Trace Generation" section below for details) progressofficial/marklogic-db ``` The example output will contain a hash of the image ID: `f484a784d99838a918e384eca5d5c0a35e7a4b0f0545d1389e31a65d57b2573d` @@ -139,11 +136,10 @@ local 0f111f7336a5dd1f63fbd7dc07740bba8df684d70fdbcd748899091307c85019 local 1b65575a84be319222a4ff9ba9eecdff06ffb3143edbd03720f4b808be0e6d18 ``` -The following command uses a named volume and named container in order to make management easier: +The following command uses a named volume and named container in order to make management easier. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details): ```bash $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ - # --cap-add=SYS_PTRACE \ (see "Enabling Stack Trace Generation" section below for details) --name MarkLogic_cont_1 \ --mount src=MarkLogic_vol_1,dst=/var/opt/MarkLogic \ -e MARKLOGIC_INIT=true \ @@ -695,11 +691,10 @@ $ docker network ls ``` The `network ls` command will list all the networks on the host. -Run this command to start the Docker container, adding your username and password to the command. It will start the Docker container (named "bootstrap") with MarkLogic Server initialized. +Run this command to start the Docker container, adding your username and password to the command. It will start the Docker container (named "bootstrap") with MarkLogic Server initialized. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details). ```bash $ docker run -d -it -p 7100:8000 -p 7101:8001 -p 7102:8002 \ - # --cap-add=SYS_PTRACE \ (see "Enabling Stack Trace Generation" section below for details) --name bootstrap -h bootstrap.marklogic.com \ -e MARKLOGIC_ADMIN_USERNAME={insert admin username} \ -e MARKLOGIC_ADMIN_PASSWORD={insert admin password} \ @@ -722,11 +717,10 @@ $ docker swarm join --token xxxxxxxxxxxxx {VM1_IP}:2377 ``` This command adds the current node to the swarm initialized earlier. -Start the Docker container (ml2.marklogic.com) with MarkLogic Server initialized, and join the container to the same cluster as you started/initialized on VM#1. Be sure to add your admin username and password for the bootstrap host in the Docker start up command that follows. To join this host to a specific MarkLogic Group, use the MARKLOGIC_GROUP environment parameter as below. +Start the Docker container (ml2.marklogic.com) with MarkLogic Server initialized, and join the container to the same cluster as you started/initialized on VM#1. Be sure to add your admin username and password for the bootstrap host in the Docker start up command that follows. To join this host to a specific MarkLogic Group, use the MARKLOGIC_GROUP environment parameter as below. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details). ```bash $ docker run -d -it -p 7200:8000 -p 7201:8001 -p 7202:8002 \ - # --cap-add=SYS_PTRACE \ (see "Enabling Stack Trace Generation" section below for details) --name ml2 -h ml2.marklogic.com \ -e MARKLOGIC_ADMIN_USERNAME={insert admin username} \ -e MARKLOGIC_ADMIN_PASSWORD={insert admin password} \ @@ -875,10 +869,9 @@ Use following command to stop the container: ```bash $ docker stop container_id ``` -3. To upgrade MarkLogic, create a new container with the latest Docker image while using the same volume mounted to the container that was running the older release. To prevent conflicts, you should either remove the old container or assign a distinct name to the new container. The following commands use a unique name for the new container with the existing volume. +3. To upgrade MarkLogic, create a new container with the latest Docker image while using the same volume mounted to the container that was running the older release. To prevent conflicts, you should either remove the old container or assign a distinct name to the new container. The following commands use a unique name for the new container with the existing volume. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details). ```bash $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ - # --cap-add=SYS_PTRACE \ (see "Enabling Stack Trace Generation" section below for details) --name MarkLogic_cont_2 \ --mount src=MarkLogic_vol_1,dst=/var/opt/MarkLogic \ progressofficial/marklogic-db @@ -891,10 +884,9 @@ $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ When creating a backup for a database on a MarkLogic Docker container, verify that the directory used for the backup is mounted to a directory on the Docker host machine or Docker volume. This is so that the database backup persists even after the container is stopped. -This command is an example of mounting the directory /space used for backup on a Docker volume, while running the MarkLogic Docker container. +This command is an example of mounting the directory /space used for backup on a Docker volume, while running the MarkLogic Docker container. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details). ```bash $ docker run -d -it -p 7000:8000 -p 7001:8001 -p 7002:8002 \ - # --cap-add=SYS_PTRACE \ (see "Enabling Stack Trace Generation" section below for details) --mount src=MarkLogic_vol_1,dst=/var/opt/MarkLogic \ --mount src=MarkLogic_vol_1,dst=/space \ -e MARKLOGIC_INIT=true \ diff --git a/test/compose-2node-bootstrap-only.yaml b/test/compose-2node-bootstrap-only.yaml index 6e462970..610e8a99 100644 --- a/test/compose-2node-bootstrap-only.yaml +++ b/test/compose-2node-bootstrap-only.yaml @@ -2,7 +2,7 @@ # Compose scenario: Bootstrap-only node used as base for follow-up join tests. version: '3.6' services: - bootstrap_2n: + bootstrap_2n: image: progressofficial/marklogic-db hostname: bootstrap_2n container_name: bootstrap_2n From fa3d2a0695557d9de186c869b9f384724adf5db6 Mon Sep 17 00:00:00 2001 From: Vitaly Korolev Date: Mon, 28 Sep 2026 18:42:32 -0700 Subject: [PATCH 2/2] address PR review comments --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32b40c5a..e7f6668d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ With this image, you have the option to either create an initialized or an unini ## Initialized MarkLogic Server For an initialized MarkLogic Server, admin credentials are required to be passed in while creating the Docker container. The Docker container will have MarkLogic Server installed and initialized, and databases and app servers created. A security database will be created to store user data, roles, and other security information. MarkLogic Server credentials, passed in as environment variable parameters while running a container, will be stored as part of the admin user in the security database. These admin credentials can be used to access MarkLogic Server Admin interface on port 8001 and other app servers with their respective ports. -To create an initialized MarkLogic Server, pass in the environment variables MARKLOGIC_ADMIN_USERNAME and MARKLOGIC_ADMIN_PASSWORD, and replace {insert admin username}/{insert admin password} with actual values for admin credentials. Use the optional environment variable MARKLOGIC_WALLET_PASSWORD and REALM to set the wallet password and authentication realm of the admin user. If not provided, the wallet-password will default to the value set for admin-password and realm will be set to public. Optionally, you can pass license information in `{insert license}`/`{insert licensee}` to apply your MarkLogic license. To do this, run this this command. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details): +To create an initialized MarkLogic Server, pass in the environment variables MARKLOGIC_ADMIN_USERNAME and MARKLOGIC_ADMIN_PASSWORD, and replace {insert admin username}/{insert admin password} with actual values for admin credentials. Use the optional environment variable MARKLOGIC_WALLET_PASSWORD and REALM to set the wallet password and authentication realm of the admin user. If not provided, the wallet-password will default to the value set for admin-password and realm will be set to public. Optionally, you can pass license information in `{insert license}`/`{insert licensee}` to apply your MarkLogic license. To do this, run this command. You can optionally add the `--cap-add=SYS_PTRACE` flag (see the "Enabling Stack Trace Generation" section below for details): ```bash $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ @@ -95,7 +95,7 @@ $ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ Example run (optionally add the `--cap-add=SYS_PTRACE` flag as described in the "Enabling Stack Trace Generation" section below): ```bash -$ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ +$ docker run -d -it -p 8000:8000 -p 8001:8001 -p 8002:8002 \ -e MARKLOGIC_INIT=true \ -e MARKLOGIC_ADMIN_USERNAME='admin' \ -e MARKLOGIC_ADMIN_PASSWORD='Areally!PowerfulPassword1337' \