Heroku Plugin Configuration Steps
To get the Heroku 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 Heroku 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 Heroku plugin.
- Install the plugin in your Copado org (select the option Install for Admin Users Only). Once the installation is complete, click on Done.
- Next, go to the App Launcher and navigate to the Copado Extensions tab.
- Select HerokuExtensionBundle 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 Heroku 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 are referencing the correct platform.
Git Repository Record
Create the Git Repository record to connect your new Heroku 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, dev, 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 App Name system property:
- App Name:
- Property Name: Heroku App Name
- API Name: app_name
- Value: Your app name. E.g., Heroku-dev.
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 Heroku.
- Based on the platform selected in the previous step, Copado applies one promotion template or another (in this case, the Heroku 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 Heroku 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 API Key system property:
- App Name:
- Property Name: E.g., Heroku API Key
- API Name: heroku_api_key
- Value: Your Heroku API key:
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 Heroku pipeline to it. Review the Project Overview and Setup article for more information about how to do this.
Alright, you have configured the Heroku plugin. Now, review the article Commit & Deployment Processes in Multi-Cloud to see how you can commit and deploy your Heroku application and changes.