Continuous Integration
Standard Support for Mule 4.1 ended on November 2, 2020, and this version of Mule reached its End of Life on November 2, 2022, when Extended Support ended. Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted. MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements. |
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 of its unit and functional tests automatically.
The advantages of CI are:
-
Provides 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 main branch.
Continuous Integration Objectives
A CI system does all of the following:
-
Listens for new commits to a project’s source code management system. The CI system watches many branches for new commits. You can either use 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.
For information about these tools, see their websites.
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 Fabric
-
Mule Agent
-
Local instances
For a complete CI example that uses Jenkins and Maven, see the Anypoint Platform Development: Advanced class on the MuleSoft training site. The training site also includes related classes and certification exams.
External CI Tools
Popular CI tools are:
-
Jenkins
-
Hudson
-
TeamCity
-
Bamboo
For information about these tools, see their websites.
Integration Notes
If you’ve chosen to use connectors 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.