Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Steps to deploy mule application with munit on cloudhub using jenkins pipeline
1. Steps to deploy Mule Application on CloudHub using Jenkins pipeline
1) Check- in your app code to SCM. Here I am using git and sample repository-
https://github.com/amitaks7/MuleSoft
2) Create pipeline is Jenkin
a) Configute git as SCM in Jenkin
Go to - manage JenkinsGlobal Tool Configurationadd Git
installed location in your system
b) Create the pipeline job
Go to New Item and select Pipeline
2. c) For the selected item go to ‘Advance Project Options’ and copy past
below script
pipeline {
agent any
tools {
// Install the Maven version configured as "M3" and add it to the
path using 'Global Tool Option' under manage Jenkin.
maven "M3"
}
stages {
stage('Munit') {
steps {
// Get sample code from a GitHub repository
git 'https://github.com/amitaks7/MuleSoft.git'
// Run Maven on a Unix agent.
bat "mvn -Dmaven.test.failure.ignore=true clean test"
}
}
stage("Deploy-CloudHub"){
steps{
bat "mvn clean package deploy -DmuleDeploy -
Dusername=XXXX -Dpassword=XXXXX"
}
}
}
}
Note: - Here for the cloudhub deployment, I am using Mule Maven plugin. Please check
the ‘configuration’ element in pom.xml
d) Run the jenkin job
3. e) Check the deployed app status in Runtime manager