Let’s discuss your requirements

    Contacts

    info@eshiasolutions.com

    +91 8780 677 436

    Blogs
    Step by step guide for MuleSoft CI & CD with Azure Devops by Eshia Solutions

    January 08 , 2021  9:58 am

    Author Name: Sangeet Gupta

    Automation has become the supreme conqueror across all sectors. It was initially developed to aid in simplifying repetitive jobs but now has evolved as a distinct entity in itself. Automation has gotten more competent over the years to the point that it can learn patterns and do the jobs independently.  

    Continuous Integration (CI) and Continuous Deployment (CD) are terms that we often use when developing any Software or Application. As such, the CI and CD are integral to the development team and form the technical core of the software/application development process. It is a problem-solving element deployed when problems arise due to new code integration towards the team related to development and operations.  

    But before we jump into the practical part, it is important to understand the following terminologies:  

    1. Continuous Integration (CI): The term CI denotes the process of automatically detecting, pulling, building, and doing unit testing while source code is changed for a product. 
    2. Continuous Deployment (CD): CD, also known as Continuous Delivery, generally refers to the overall chain where the changes are automatically prepared to run according to the goal. 

    Many CI/CD platforms are available, including GitLab, CircleCI, TeamCity, BamBoo, and many others. We, at Eshia Solutions, use Azure DevOps. Now let us get to the practical part. 

    Pre-requisites:

    Anypoint Studio
    AnypointCloudhub Credentials
    Azure DevOps Credentials

    Step-1 

    Login to Azure DevOps (if not, create a new account) and create a Repository. 

    Step-2 

    Open Anypoint Studio and create a Mule project (or we can use existing projects as well). 

    Step-3 

    Now navigate to the Project’s pom.xml file and add Cloud-hub deployment configuration under Configuration tag. 

    Step-4 

    Save the code and commit this code to Azure DevOps Repository. 

    Step-5 

    Now navigate to Azure DevOps and create a new Pipeline. 

    Pipeline: Azure Pipelines automatically build and test code projects to make them available for others. 

    Pipeline combines CI/CD (Continuous Integration and Continuous Deployment) for consistent testing, and builds our code, and ships it to any target, such as any specific server. Here our target is Anypoint Runtime. 

    Once it’s created, click on the new Pipeline. 

    Step-6 

    Click on Use the Classic Editor. 

    Step-7 

    Select Team Project, Repository, and Branch, and then click on Continue. 

    Step-8 

    Search Maven Plugin in the search box and select Maven from the featured tab. 

    Step-9 

    Once Maven is added, we can see the below prompt. 

    Now select Copy Files and Publish Artefact and click on Delete. 

    Add Maven Configuration. 

    Select Save & Queue and click on save with the appropriate message. 

    Here we gave three Arguments. 

    • POM file 
    • Goal: Maven goals represent a specific task that contributes to building and managing a project. We can also execute these goals via the command line. 
    • Option: In Option, we have provided the Maven command package deploy –Dmule Deploy. This command will take the compiled code and package it in its distributable format (JAR). 

    Step-10 

    Navigate to the Library and click on the Secure file. 

    Browse the settings.xml file. 

    This file is located at (MAVEN_HOME\conf\settings.xml). 

    Step-11 

    Now add the Maven settings file by adding the downloaded secure file plugin. 

    Give a Reference Name and pass this reference name to Maven Goal. 

    The Reference name which is shown we will use it with maven goal. Make sure you have added server credentials under settings.xml

    Step-12 

    Once the Configuration is done, we will run the Pipeline with the appropriate message. 

     Once running is completed, we will see the below screen. 

    We can see Right mark in green color beside our Agent job

    Take-away 

    As technology and automation develop, so must problem-solving associated with them. That is precisely what the MuleSoft solutions offer.  

    DevOps have enabled innovation in the development and operations teams working in collaboration. They come with numerous benefits such as speedy operations, efficient delivery, reliability, greater scalability, collaborative spirit, and even security. Pros aside, hindrances are inevitable in any process.  This is where CI/CD comes to play in solving these issues and making the DevOps implementation far more effective.  

    The step-by-step process explained above with screenshots for simplified understanding will assist you in implementing this process with an understanding and ease. For any queries, you can always contact us. We are experts in offering end-to-end MuleSoft integration services, connecting your data, applications, devices and APIs. 

    Leave a comment

    Your email address will not be published.

    Previous Next
    Close
    Test Caption
    Test Description goes like this