← Projects

azure-devops-mulesoft-pipelines

Azure Pipelines · MIT · Stable

On this page

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

GitFlow flow of the template: pull requests and feature, release and hotfix branches run a build; develop builds, publishes the x.y.z-SNAPSHOT to Exchange and deploys to test; main runs the Maven release, creates the tag vx.y.z, publishes to Exchange and takes the same artifact to uat, then approval, then prod.

What it does

  • Pull request and feature/*, release/* and hotfix/* branches: build.
  • develop: build, publishing the x.y.z-SNAPSHOT to Exchange and deployment to test.
  • main: build, Maven release (tag vx.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

Code for this page