azure-devops-mulesoft-pipelines
Code
When every Mule application carries its own pipeline, delivery varies from project to project — which is what the series Delivering MuleSoft applications with Azure DevOps (starting with GitFlow for MuleSoft: branch rules a pipeline can act on) builds with this repository, azure-devops-mulesoft-pipelines. Here the application keeps a ten-line azure-pipelines.yml and delegates the flow to a tagged version of this repository.
The flow
What it does
- Pull request and
feature/*,release/*andhotfix/*branches: build. develop: build, publishing thex.y.z-SNAPSHOTto Exchange and deployment to test.main: build, Maven release (tagvx.y.z, publishing to Exchange), deployment to uat and to prod, the latter with approval.- The same release artifact goes to uat and prod; nothing is rebuilt per environment.
Limits: the reference project is private, because Azure DevOps no longer allows public projects, and the reference application, mulesoft-orders-api, now delivers in GitHub Actions, and the application’s v1.0.0 tag preserves this pipeline.
Getting started
Needs a variable group with the Anypoint Connected App, the test, uat and prod environments (the last one with Approvals) and a GitHub service connection. The application needs a groupId equal to the Anypoint organization ID, distributionManagement for Exchange, the maven-release-plugin, the cloudhub2Deployment block, a deployment/<env>.yaml per environment and, for the pipeline identity, permission to push to main. Then:
resources:
repositories:
- repository: templates
type: github
endpoint: <your GitHub service connection>
name: brunosouzas/azure-devops-mulesoft-pipelines
ref: refs/tags/v1.2.1
extends:
template: templates/stages/gitflow.yml@templates
parameters:
nextVersionBump: minor # patch | minor | major
Where it appears
- Delivering MuleSoft applications with Azure DevOps, the series, starting with GitFlow for MuleSoft: branch rules a pipeline can act on.