Posts

Showing posts with the label CI/CD Pipeline

Enterprise CI/CD for MuleSoft CloudHub 2.0 using GitHub Actions & Anypoint CLI

Image
I've worked on many MuleSoft projects over the years, and looking back, I was always annoyed by the mundane tasks of setting up an API on Anypoint Platform and maintaining coherent configuration across multiple APIs. Not to mention, the Platform UI isn't much fun to use either. Now, Anypoint CLI has been around for quite some time now and has matured a lot. I wanted to combine the capabilities of Anypoint CLI with DevOps CI/CD and share it with the world, not lock it behind a paywall. This blog covers how I did this in GitHub Actions while maintaining enterprise-level quality and security. I also chose CloudHub 2.0 for my deployments to keep things relatively new. I'll show the entire setup so you can recreate and make it your own. First, let me summarize the features of my implementation, like an AI :D CloudHub 2.0; GitHub Actions; Anypoint CLI MUnits (I've commented this code because MUnit plugin for CI/CD is only available for licensed MuleSoft users, not for Trial a...

GitLab CI/CD Pipeline for CloudHub 2.0 Deployment (with Auto Incrementing Version)

Image
This document covers GitLab CI/CD Pipeline Script for deploying Mule App to CloudHub 2.0. If you are experienced in setting up CI/CD Pipeline for CloudHub 1.0 and have tried to re-use the same script for CloudHub 2.0, then you must have found that it doesn't work. The fact is that Mulesoft's CloudHub 2.0 deployments are tightly coupled with Anypoint Exchange, viz., every Mule App that is deployed in Runtime Manager must be linked with a corresponding instance in Anypoint Exchange. One common hurdle that Mule Developers face when setting up CloudHub 2.0 specific pipelines is how Mule App's version can be automatically incremented whenever a pipeline is started. This is again due to CloudHub 2.0 being tightly coupled with Anypoint Exchange. This document also covers logic to handle that in POM file. Let’s begin... Pre-requisites Mule App GitLab Account with available Runners & configured Deployment/Environment Variables Connected App in Anypoint Platform with Correct Perm...