DEV Community

Bruno Souza
Bruno Souza

Posted on

Deploying MuleSoft Application to Cloudhub 2.0 using Azure DevOps - Part 2

This article is the continuation from Deploying MuleSoft Application to Cloudhub 2.0 using Azure DevOps - Part 1
Now we talk about how to deploy a MuleSoft Application to Production environment with approvers.

Just to remember you, here is the deploy process

Azure Devops

We did the steps to develop and now we will use the artifact created in develop step and deploy in production environment.
you will need to update the devops-scripts repository to have the scripts we will be using in the steps below.

Import the Release Pipeline

Navigate to Pipeline / Releases and click in Import release pipeline
The template is in your repository devops-scripts/common/template-release-pipeline.json to import
To reuse the template import and clone the pipeline to new projects.

Azure Devops

Azure Devops

Change the Release Pipeline Name to hello-world
Click in _artifacts and delete
Add a new Artifacts like example below

Azure Devops

Source Type: Build
Project: Add the Azure Project when have the application repository
Source (build pipeline): Select the MuleSoft Application (hello-world)
Default version: Specify at the time of release creation
Source Alias: _artifact

Click in _develop-scripts and delete
Add a new Artifacts like example below

Azure Devops

Source Type: Azure Repository
Project: Mulesoft-Project
Source (repository): devops-scripts
Default branch: main
Default version: Latest from the default branch
Source Alias: _devops-scripts

Add Approvers to Deploy in Production

Azure Devops

Click in the Task

Azure Devops

Click in Job to Select the Agent Pool (MacOS/Linux)

Azure Devops

Select the settings.xml

Azure Devops

Link the variable groups

Azure Devops

anypoint-platform-variables : Scopes - Release
anypoint-platform-<ENVIRONMENT>-variables : Select the Scope to Specific Environment
<APPLICATION NAME> : Scopes – Release

Continue in Variables and let's create 2 variables

Azure Devops

Ps. You can add this variable in library but the idea is show the options to you learn and improve in your tests.

Now Click in Save and create release

Azure Devops

Choose the artifact that you have after deploy in develop (pipeline)

Azure Devops

Config Slack/Teams to Azure DevOps

The notification doesn't in scripts, you need config your tools using the links below.

Slack
Microsoft Teams

Conclusion

We finished the deployment process with these two articles, I believe that now you can have a base to continue studying.

In the next article I'll talk about parent-pom and how to have specific properties in your project and deploy them without having to add them to the parent-pom.

Reference:
Azure-DevOps
Deploying MuleSoft Application to Cloudhub 2.0 using Azure DevOps - Part 1

Code Source
devops-scripts
MuleSoft hello-world

Top comments (3)

Collapse
 
tch profile image
Thomas-Charles HAUDRY

Hello Bruno! Very good article. But it seems there is no json for the CD when you say : The template is in your repository devops-scripts/common/template-release-pipeline.json to import.
I use to play with CLI but maven still remain a very good alternative.

Collapse
 
brunosouzas profile image
Bruno Souza

Hi Thomas, I forgot push the json to repository, I’ll update the repo. Many thanks mate

Collapse
 
jpontdia profile image
Joaquín Ponte

Great article, thanks!