Continuous Integration
Mule Runtime Engine versions 3.5, 3.6, and 3.7 reached End of Life on or before January 25, 2020. For more information, contact your Customer Success Manager to determine how you can migrate to the latest Mule version. |
With all the emphasis on testing, the need for continuous integration (CI) for your 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:
-
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.
-
Pulls the newest branch into a centralized server.
-
Creates build jobs on a centralized server.
-
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.
-
Stores artifacts in a repository.
-
Displays the results of each build.
-
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
-
Runtime Manager 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. |
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.
|