-
Notifications
You must be signed in to change notification settings - Fork 53
MLE-24531 Converting Jenkinsfile to use Docker #974
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
Conversation
|
Copyright Validation Results ⏭️ Skipped (Excluded) Files
✅ All files have valid copyright headers! |
Also bumped up tar-fs to resolve a vulnerability. Going to format Jenkinsfile in a subsequent PR.
6e2d821 to
73c1ebb
Compare
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.
Pull Request Overview
This PR converts the Jenkins pipeline from using direct MarkLogic RPM installations to using Docker containers, streamlining the build and test environment setup.
- Replaced manual MarkLogic RPM installation with Docker Compose-based setup
- Updated port mappings and container configuration for consistent test environment
- Removed obsolete Docker Compose configuration files and test stages
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test-app/docker-compose.yaml | Updated service name and consolidated port mappings for Docker-based testing |
| test-app/docker-compose-nightlies.yaml | Removed obsolete nightly build configuration file |
| package.json | Updated tar-fs dependency to newer version |
| Jenkinsfile | Converted from RPM-based to Docker-based MarkLogic deployment with new helper functions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| sudo /usr/local/sbin/mladmin cleandata | ||
| cd node-client-api/test-app | ||
| MARKLOGIC_LOGS_VOLUME=/tmp MARKLOGIC_IMAGE='''+markLogicDockerImage+''' docker-compose up -d --build | ||
| sleep 60s; |
Copilot
AI
Oct 7, 2025
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 hardcoded 60-second sleep is a fragile approach for waiting for container readiness. Consider using a health check or polling mechanism to verify MarkLogic is actually ready before proceeding.
| sleep 60s; | |
| # Wait for MarkLogic to be ready by polling the HTTP endpoint | |
| echo "Waiting for MarkLogic to become ready..." | |
| for i in {1..30}; do | |
| if curl -s http://localhost:8001/ > /dev/null; then | |
| echo "MarkLogic is ready!" | |
| break | |
| else | |
| echo "MarkLogic not ready yet, waiting..." | |
| sleep 2 | |
| fi | |
| if [ $i -eq 30 ]; then | |
| echo "MarkLogic did not become ready in time." >&2 | |
| exit 1 | |
| fi | |
| done |
| docker-compose down -v || true | ||
| sudo /usr/local/sbin/mladmin cleandata | ||
| cd node-client-api/test-app | ||
| MARKLOGIC_LOGS_VOLUME=/tmp MARKLOGIC_IMAGE='''+markLogicDockerImage+''' docker-compose up -d --build |
Copilot
AI
Oct 7, 2025
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.
Using /tmp for log volume could lead to log loss and potential disk space issues. Consider using a more persistent location or making this configurable.
| MARKLOGIC_LOGS_VOLUME=/tmp MARKLOGIC_IMAGE='''+markLogicDockerImage+''' docker-compose up -d --build | |
| MARKLOGIC_LOGS_VOLUME=$WORKSPACE/marklogic-logs MARKLOGIC_IMAGE='''+markLogicDockerImage+''' docker-compose up -d --build |
No description provided.