This KB article lists some available tools for continuous integration and automatically deploying the MarkLogic Server
Roxy is an open source utility for configuring and deploying MarkLogic applications. Using Roxy you can define your app servers, databases, forests, groups, tasks, etc in local configuration files. Roxy can then remotely create, update, and remove those settings from the command line.
MarkLogic Admin API and REST API can be used to script server configurations
MLSound is an open source tool for deploying and bootstraping projects into MarkLogic 8.
Roxy includes a unit testing component that allows tests to be written in XQuery and run from the UI or from the command line.
Another useful open source unit testing tool that is available for writing XQuery unit tests is ‘xray’ - https://github.com/robwhitby/xray
Implementation Specific Tools
There are also implementation specific tools to help with check-in build/deployment:
For use with Java
ml-gradle is a Gradle plugin that supports a number of tasks pertaining to deploying an application to MarkLogic Server and interacting with other features of MarkLogic via a Gradle build file
mlnodetools are a collection of command line tools used to simplify the administration of MarkLogic Server
MarkLogic Python API aims to provide complete coverage of what's in the MarkLogic REST API in idiomatic Python
Jenkins is often used with MarkLogic Server for building deployable artifacts, staging build artifacts, running automated tests, and deploying said artifacts. Jenkins has great REST endpoints that make it easy to get / put job configurations, and enable / disable jobs from scripts.
Jenkins provides a driver to the continuous integration / continuous delivery process that can integrate with other tools. In combination with Roxy, it can be used to run a bootstrap/deploy module/unit test on code check-in.
One pipeline example used with Jenkins is to:
1) Pull from Git
2) Deploy to DEV with Roxy
3) Run xray unit testing and Sonar vulnerability scans
4) Email a report of the success/failure
5) Kick off job to deploy to another environment
Also noted that the most important best practice here would be to make sure Jenkins runs primarily off of a host other than a MarkLogic host.