MuleSoft Plugin Configuration Steps
To get the MuleSoft plugin for Multi-Cloud up and running in your organization, there are several steps you need to follow. This is what the overall process looks like:
You may already be working with Copado for Salesforce DevOps, in which case you don’t need to follow the process of installing Copado and getting the necessary licenses. If this is not the case, review the article Copado Base Setup and Implementation before proceeding with the plugin installation.
Installing the Plugin
First of all, you need to install the MuleSoft plugin (unlocked package).
Additionally, make sure My Domain is enabled in the org where you are installing the plugin. Otherwise, you won't be able to complete the installation process.
To do this, follow the steps below:
- Contact your customer success manager to get the MuleSoft plugin.
- Install the plugin in your Copado org (select the option Install for Admins Only). Once the installation is complete, click on Done.
- Next, go to the App Launcher and navigate to the Copado Extensions tab.
- Select MuleExtensionBundle in the Select Extension picklist.
- Then, click on Generate Extension Records. Copado will create all the promotion and deployment step records in your org.
- In the future, when you upgrade the plugin package to the latest version, remember to repeat the Generate Extension Records action to update the plugin scripts.
Once this process is complete, you need to perform some manual steps and create the environment and pipeline records in Copado. Go ahead and see how you can do this.
Add the Mulesoft value to the Platform picklist field in both Environment and Pipeline objects (see Salesforce’s article Add or Edit Picklist Values for more information about how to do this) to ensure these records reference the correct platform:
Git Repository Record
Create the Git Repository record to connect your MuleSoft Git repository with Copado. You can find the step-by-step process in the Git Repository Overview article.
Create the different environments that will be part of your pipeline, your local dev environment, staging and production. For more information about how to create an environment, review the article Environments article.
Environment System Properties
Once you have created all the environments, navigate to the System Properties related list in the Environment record and create the following system properties:
- App Name:
- Property Name: Mule App Name
- API Name: Mule_App_Name
- Value: Your app name. E.g., MuleDev.
- Environment Name:
- Property Name: Mule Environment Name
- API Name: Mule_Environment_Name
- Value: The name of the environment. E.g., Staging
- Skip Test:
This property allows you to specify whether or not you want to run MUnit tests when deploying (you need an enterprise MuleSoft license to be able to run MUnit tests).
- Property Name: Mule Skip Test
- API Name: Mule_Skip_Test
- Value: true or false
If you set it to false, you need to create two additional system properties:
- Worker Count (worker count refers to the number of workers, aka servers, that are going to be used in parallel to handle API calls):
- Property Name: Mule Worker Count
- API Name: Mule_Worker_Count
- Value: Your worker count. E.g., 1.
- Worker Type (this is the Mulesoft worker size):
- Property Name: Mule Worker Type
- API Name: Mule_Worker_Type
- Value: The worker type. E.g., Micro
The next step is to create the Pipeline record. To do that, follow these steps:
- Navigate to the Pipelines tab and click on New.
- Give your pipeline a name and select the Git Repository record you created in a previous step.
- Select the main branch, which is usually master (or main if you use GitHub as Git provider) and flag the Active checkbox.
- In the Platform picklist field, select Mulesoft.
- Based on the platform selected in the previous step, Copado applies one promotion template or another (in this case, the Mule Promote template). If you want to use a different template, you can clone the out-of-the-box template to add additional parameters and select it in the Promotion Automation field.
- As with the promotion template, Copado automatically selects the relevant deployment template according to the chosen platform, the Mule Deploy template in this case. If you want to clone this template to include additional parameters, you can then select the cloned template in the Deployment Automation field.
- You can leave all other fields for now. Click on Save to save the changes.
Pipeline System Properties
Once you have created the pipeline, navigate to the System Properties related list and create the following system properties:
- Client Id:
- Property Name: Mule Client Id
- API Name: Mule_Client_Id
- Value: Your client Id (see MuleSoft’s article Obtaining the Client Credentials of a Registered Client Application for more information about how to obtain your client Id).
- Select the Hide Value checkbox (this is not compulsory but is recommended).
- Client Secret:
- Property Name: Mule Client Secret
- API Name: Mule_Client_Secret
- Value: Your client secret (see the article above for more information about where to find your client secret).
- Select the Is Sensitive checkbox (this is not compulsory but is recommended).
- Property Name: Mule_Runtime_Version
- API Name: Mule_Runtime_Version
- Value: 4.3.0
Navigate to the Pipeline Connections related list and create the connections between the different environments. Review the section Creating a Pipeline Connection from the Pipeline Connections Related List to go through the step-by-step process.
Finally, create a Project record and link your MuleSoft pipeline to it. Review the Project Overview and Setup article for more information about how to do this.
Now that you have completed the Copado setup, the last step you need to perform is add the below build xml to the pom.xml file of your MuleSoft project in the root folder:
Alright, you have configured the MuleSoft plugin. Now, review the Commit & Deployment Processes in Multi-Cloud article to see how you can commit and deploy your MuleSoft application and changes.