A small Mule 4 application used as the reference for a corporate-style delivery flow: GitFlow, versioning with the maven-release-plugin, and Azure Pipelines templates deploying to CloudHub 2.0 with approvals.
The API itself is deliberately simple. The interesting parts are the branch rules, the release process and the pipeline.
| Method | Path | Result |
|---|---|---|
| GET | /api/health |
{ status, application, environment } — confirms which environment answered |
| GET | /api/orders/{orderId} |
An order, or 404 |
| POST | /api/orders |
201 with the total, or 400 for invalid input |
feature/* ──PR──▶ develop ──▶ SNAPSHOT to Exchange ──▶ test
│
release/x.y.z ──PR──▶ main ──▶ Maven release (tag vx.y.z) ──▶ uat ──▶ prod (approval)
▲
hotfix/x.y.z ──────────────PR───────────┘
Branch rules are in CONTRIBUTING.md. The pipeline is a thin azure-pipelines.yml that extends the shared templates in azure-devops-mulesoft-pipelines, pinned to a tag. The reasoning behind each choice is recorded as ADRs in that repository.
The Azure DevOps project is private (Microsoft no longer allows new public projects in this organisation). Every run still reports back to GitHub as a check on commits and pull requests, and the badges above are public.
| Environment | Health check |
|---|---|
| test | /api/health |
| uat | /api/health |
| prod | /api/health |
These run on an Anypoint Platform trial and may be stopped when the trial ends.
| File | Purpose |
|---|---|
src/main/resources/config/config-<env>.yaml |
Application properties per environment (selected by mule.env) |
deployment/<env>.yaml |
CloudHub 2.0 sizing per environment (application name, target, runtime, replicas, vCores) and the healthUrl used by the post-deployment smoke test |
Secrets never live in the repository: the pipeline receives the Anypoint Connected App credentials from an Azure DevOps variable group and writes settings.xml at runtime.
mvn clean testMUnit needs the MuleSoft Enterprise repository (customer credentials in ~/.m2/settings.xml). The public pipeline does not have them, so it builds with -DskipMunitTests and MUnit runs locally before each pull request — see ADR 4.
Change groupId in pom.xml to your organization ID, adjust deployment/*.yaml to your environments and target, and create the Azure DevOps items listed in the templates README.
MIT © Bruno Pinto de Souza