DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Java CI/CD: From Local Build to Jenkins Continuous Integration
  • Microservices Testing: Key Strategies and Tools
  • AppOps with Kubernetes and Devtron - The Perfect Fit
  • Travis CI vs Jenkins: Which CI/CD Tool Is Right For You?

Trending

  • Endpoint Security Controls: Designing a Secure Endpoint Architecture, Part 2
  • Why High-Performance AI/ML Is Essential in Modern Cybersecurity
  • Mastering Advanced Traffic Management in Multi-Cloud Kubernetes: Scaling With Multiple Istio Ingress Gateways
  • Endpoint Security Controls: Designing a Secure Endpoint Architecture, Part 1
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Recipe To Implement the Jenkins Pipeline For MuleSoft Application [Videos]

Recipe To Implement the Jenkins Pipeline For MuleSoft Application [Videos]

Take a look at this recipe for creating a Jenkins pipeline for MuleSoft applications with these videos and feature descriptions of tools.

By 
Jitendra Bafna user avatar
Jitendra Bafna
DZone Core CORE ·
Jan. 30, 20 · Tutorial
Likes (7)
Comment
Save
Tweet
Share
24.9K Views

Join the DZone community and get the full member experience.

Join For Free

What is DevOps?

DevOps is a culture which promotes collaboration between Development and IT Operations Team to deploy code to production faster in an automated & repeatable way.

Benefits of DevOps

  • Releases/deployment can be done more frequently and quicker.
  • Shorter mean time to repair.
  • Cost reduction and reliable deployment.
  • Fault isolation.

You may also enjoy: Building a Continuous Delivery Pipeline Using Jenkins

What is CI/CD?

Continuous Integration is a development practice where developers checked in the code multiple times a day in a shared repository. Each integration is verified by an automated build and automated unit testing.

Continuous Deployment is the ability to move the changes including features, bug fixes into the production quicker.

Benefits of CI/CD

  • Quicker releases
  • Smaller code changes
  • Faster Mean Time To Resolution (MTTR).
  • Improved testability.
  • Improved customer satisfaction.

3.0 What is Jenkins?

Jenkins is an open-source continuous integration server capable of orchestrating a chain of actions that help to achieve the continuous integration process (and not only) in an automated fashion.

Jenkins is free and is entirely written in Java. Jenkins is a widely used application around the world that has around 300k installations and growing day by day.

Jenkins and MuleSoft

CI/CD Tools For Deploying MuleSoft Application

There are many tools available to achieve CI/CD pipeline. In today’s demonstration, we will walk through this list of tools and they are widely used tools for achieving DevOps for your Mulesoft services/applications.

Tools description

Github

GitHub is a Git repository hosting service and provides a web-based graphical interface. It also provides access control and several collaboration features, such as wikis and basic task management tools for every project

Git

Git is the most commonly used version control system today and is quickly becoming the standard for version control. Git is a distributed version control system, meaning your local copy of code is a complete version control repository. 

MUnit

MUnit is a Mule application testing framework that allows you to build automated tests for your Mule integrations and APIs. MUnit is very well integrated with Anypoint Studio.

Nexus

Nexus is a repository manager. It allows you to proxy, collect, and manage your dependencies so that you are not constantly juggling a collection of JARs

SonarQube

SonarQube (formerly Sonar) is an open-source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities on 20+ programming languages.

MUnit

MUnit is a Mule application testing framework that allows you to build automated tests for your Mule integrations and APIs. MUnit is very well integrated with Anypoint Studio.

MUnit Matchers

MUnit matchers are a set of DataWeave functions to define assertion conditions for any value in an expression. When defining matchers, include the prefix MunitTools:: in the expression.

Matchers are grouped according to the type of conditions you want to validate.

Type Of Matchers

  • Core Matchers
  • String Matchers
  • Comparable Matchers
  • Iterable and Map Matchers

For more details on MUnit Matchers, click here.

Apache JMeter

Apache JMeter is an open-source software that is popular for performance testing. This tool is designed to load test functional behavior and measure performance.

It is very easy to integrate Apache JMeter with Jenkins for performing the load testing and generating the reports.

Postman And Newman CLI

Postman is currently one of the most popular tools used in API testing. A Postman Collection lets you group individual requests together. You can organize these requests into folders.

Postman Tests are JavaScript codes added to requests that help you verify results such as successful or failed status, comparison of expected results, etc. It usually starts with pm.test. It can be compared to asserts and verify commands available in other tools.

Newman is a command-line Collection Runner for Postman. It allows you to run and test a Postman Collection directly from the command line. It is built with extensibility in mind so that you can easily integrate it with your continuous integration servers and build systems. 

It is capable of generating Command Line as well as HTML reports.

Some useful Newman commands:

Install Newman NPM: —  npm install -g newman 

Run Newman: —  newman run Collection.postman_collection.json 

Install HTML Extra: —  npm install -g newman-reporter-htmlextra 

Run Newman HTML Report: —  newman run postman_collection.json -r htmlextra --reporter-htmlextra-export “path” 

Newman Command-Line Report

Command-line report

Newman HTML Report

HTML report

MuleSoft Deployment Options

Mulesoft provides various options for deploying your application.

  • Standalone (On-premises)
  • Cluster
  • CloudHub
  • Anypoint Runtime Fabric
  • Private Cloud

Mule Maven Plugin

Mule Maven Plugin provided functionality of deploying and undeploying application to on-premise, CloudHub, cluster, or Anypoint runtime fabric. You need to add Mule Maven Plugin into your POM.xml of your application.

XML
 




x


 
1
<plugin>
2
   <groupId>org.mule.tools.maven</groupId>
3
   <artifactId>mule-maven-plugin</artifactId>
4
   <version>3.3.5</version>
5
</plugin>


Deploy Application:  mvn clean package deploy -DmuleDeploy 

Undeploy Application:  mvn mule:undeploy 

Deploying Mule Application to Cloudhub Using Mule Maven Plugin

The Mule Maven plugin has the the capability to deploy an application to Anypoint CloudHub. We need to understand some of the Mule Maven plugin parameters required for deploying an application to CloudHub.

parameters description

uri

Your Anypoint Platform URI.

If not set, by default this value is set to https://anypoint.mulesoft.com

muleVersion

The Mule runtime engine version that will run in your CloudHub instance.

applicationName

The name of your application in CloudHub.

username

Your Cloudhub username.

password

Your Cloudhub password.

server

Maven server with Anypoint Platform credentials. 

workers

The number of workers.

By default, it is set to 1

workerType

Size of each worker.

The default value is MICRO.

environment

The CloudHub environment to which you want to deploy.

businessGroup Business Group of Deployment.
properties If you need to set properties for the Mule application you are deploying, you can use the <properties> top-level element:
Java
 




xxxxxxxxxx
1


 
1
<properties>
2
<key>value</key>
3
</properties>



For example:

Java
 




x


 
1
<properties>
2
<http.port>8081</http.port>
3
</properties>



region

Region of workers cloud.

The default value is us-east-1.


Deploying Mule Application to On-Premise Using Mule Maven Plugin

For more details on MuleSoft application deployment, click here.

YouTube Videos References

Deploying Mulesoft Application to Cloudhub Using Mule Maven Plugin

Deploying Mulesoft Application to CloudHub using Jenkins and Maven

Configuring Jenkins CI/CD Pipeline For Mulesoft Applications - Part I

Configuring Jenkins CI/CD Pipeline For Mulesoft Applications - Part II


Configuring Jenkins CI/CD Pipeline For Mulesoft Applications - Part III

Configuring Jenkins CI/CD Pipeline For Mulesoft Applications - Part IV

Configuring Jenkins CI/CD Pipeline For Mulesoft Applications - Part V

Create Postman Test Collection Suite for Mulesoft API

Performance or Load Testing for Mulesoft API Using Apache JMeter


application Continuous Integration/Deployment MuleSoft Jenkins (software) Pipeline (software) Open source Integration Apache Maven Version control Apache JMeter

Opinions expressed by DZone contributors are their own.

Related

  • Java CI/CD: From Local Build to Jenkins Continuous Integration
  • Microservices Testing: Key Strategies and Tools
  • AppOps with Kubernetes and Devtron - The Perfect Fit
  • Travis CI vs Jenkins: Which CI/CD Tool Is Right For You?

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!