Continuous Integration

Mule runtime engine version 3.8 reached its End of Life on November 16, 2021. For more information, contact your Customer Success Manager to determine how to migrate to the latest Mule version.

The need for continuous integration (CI) for a project is very important. By using Maven as your build tool, you can create a build that gets triggered on every project change, and run all its unit and functional tests automatically.

The advantages of CI are:

  • Early notification of issues in the software development lifecycle.

  • Ensures code gets fully tested before release.

  • Successfully tested branches ensure better success when merging to the master branch.

Continuous Integration Objectives

A continuous integration system:

  1. Listens for new commits to a project’s source code management system. The CI watches many branches for new commits. You can use either polling to find new commits, or the management system can trigger events that inform your program of commits.

  2. Pulls the newest branch into a centralized server.

  3. Creates build jobs on a centralized server.

  4. Runs configurable unit and integration tests on the code base that compile, test, package, and deploy the project in a sandbox to ensure the project works correctly.

  5. Stores artifacts in a repository.

  6. Displays the results of each build.

  7. Deploys passing builds to production.

MuleSoft CI Tools

You can deploy Mule applications using:

You can create functional tests with MUnit Unit Testing.

The mule-maven-plugin supports deployments to:

  • CloudHub

  • Anypoint Runtime Manager

  • Mule Agent

  • Local instances

For a complete CI example using Jenkins and Maven, see MuleSoft Training’s Advanced Anypoint Platform Development class. See also the complete catalog for other classes and certification exams.

External CI Tools

Popular continuous integration tools are:

Integration Notes

If you’ve opted for using real transports in your functional test cases, watch out for potential port conflicts that can occur in a continuous build server.

If your target deployable is a web application and not a Mule application, consider using Junit Integration Test Runner for running your functional tests and avoiding port conflicts.

If you create Maven projects from the command line using archetypes, you need to manage your POM file manually, and in some cases, adjust your settings.xml file to point to the MuleSoft Enterprise repository and supply credentials. In some cases, even if you manage your project with Studio, you may need to make manual adjustments to your POM as well.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub