MuleSoft provides Maven plugins that can automate the process of creating a new build that is triggered on every project change on different run-time environments.
There are various ways to install Mule Runtime:
- Standalone Server
- Server Group
This article will outline a detailed step-by-step guide on how to configure a Jenkins and Mule Maven project for continuous integration and delivery. We will also demonstrate two deployment process scenarios, one for a standalone Mule runtime server and another on CloudHub.
- Jenkins 2.190.2
- Mule Runtime 3.9.3
- Maven 3.6.2
- Java 1.8
- Git 2.23.0
- Bitbucket for code repository
- Source tree to commit the code
Important Note: In order to connect and fetch resources from the Enterprise Maven Repository, you should contact the mule support center to receive your Enterprise Maven credentials and that will need to be entered into your settings.xml file (usually present within the $USER_HOME/.m2/ directory on your machine).
1. Configure maven:
- Download maven and set the environment variable
2. Configure settings.xml:
- Go to your $USER_HOME/.m2/ directory.
- Open settings XML adds the following section within the <servers> tag and replace YOUR_ID and YOUR_PASSWORD with the credentials provided to you by MuleSoft Support.
- Add the following section within the <profiles> tag to point to the location of the Enterprise Repository, referencing the same name above “Any Name”:
3. Download Git and set the environment variable
4. Install and Configure Jenkins:
- Download and Install the Jenkins
- Login into Jenkins
- Create Jenkins credentials
- Installed maven, git and pipeline plugin
- Go to Global Tool configuration and add the maven, JDK and git path
- Create a Jenkins Item with necessary details:
5. Create Mule-Maven Application
- Add the below plugin into pom.xml file
- In the property file, add the anypoint username, password and environment.
Mule Standalone Server:
6. Commit Code: Make some changes in the code and commit the code into Bitbucket repository through SourceTree. The Jenkins job will start automatically, and the mule application will be deployed/redeployed in the Cloudhub and Standalone Mule runtime.
7. Check the Jenkins Deployment Result
8. Application Testing: Test the application through postman.
The advantages of automated deployment to different environments triggered by changes are immense:
- Increase the chances of Go-to-market faster
- Release more often
- Configure it once
- Developers can develop
- Anyone can deploy
- Chances of error are reduced
- Immediate feedback
About Incepta Solutions
At Incepta Solutions, our team of #InceptaInnovators is passionate about developing the bridge between people and operations, as we create stories that we can all be proud of.
Since our inception in 2010, we are recognized as trusted experts in providing digital services to global businesses. We are proud to be named one of the top 5 Information Technology companies in Canada on the Growth List 2020 (published by Canadian Business and MacLeans). In addition, we are humbled to be recently certified as a Great Place to Work.
Our full suite of digital services includes:
Cybersecurity | Integration | Digital Transformation
Data Management | Cloud Strategy | Customer 360
At Incepta Solutions, we provide business solutions that solve challenges and enable future growth and success for all of our clients. We leverage industry-leading technologies to provide innovative solutions that are robust, of premier quality, and cost-effective.
In our growth journey, our goal is to become a global leader in digital transformation and enterprise solutions. We enable businesses all over the world to solve complex and critical integration challenges. As #InceptaInnovators, we hope to look back at these times on how we have helped global brands and enterprises achieve success. Our driving force is that one day, we are able to reflect on our shared journey and be proud of the stories we have created together.
Incepta Solutions | Powered by innovation, driven by results