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
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.
Change the Release Pipeline Name to hello-world
Click in _artifacts and delete
Add a new Artifacts like example below
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
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
Click in the Task
Click in Job to Select the Agent Pool (MacOS/Linux)
Select the settings.xml
Link the variable groups
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
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
Choose the artifact that you have after deploy in develop (pipeline)
Config Slack/Teams to Azure DevOps
The notification doesn't in scripts, you need config your tools using the links below.
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)
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.
Hi Thomas, I forgot push the json to repository, I’ll update the repo. Many thanks mate
Great article, thanks!