Heroku Plugin Configuration Steps

Updated 3 months ago by Copado Solutions

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:

Configuration steps flow

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.

Heroku application
If you don’t have a Heroku application, it is recommended that you build it before installing the plugin and creating the records in Copado, as there are some parameters related to your application that you need to add to Copado. For more information about how to do this, visit Heroku Dev Center.

Installing the Plugin 

First of all, you need to install the Heroku plugin (unlocked package).

The plugin requires the latest version of Copado. If you don’t have the Copado Deployer package installed yet, do so before installing this plugin.

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:

  1. Contact your customer success manager to get the Heroku plugin.
  2. Install the plugin in your Copado org (select the option Install for Admin Users Only). Once the installation is complete, click on Done.
  3. Next, go to the App Launcher and navigate to the Copado Extensions tab.
  4. Select HerokuExtensionBundle in the Select Extension picklist.
  5. Then, click on Generate Extension Records. Copado will create all the promotion and deployment step records in your org.
    1. 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.

Copado Configuration

Picklist Value

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.

Platform picklist value
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.

Heroku Git repository record

Environment Records

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. 

You can also use the CLI command sfdx copado:environment:create to create the Environment records.
Heroku environment record
Since Copado’s data model is based on credentials, you need a credential for each environment even if you are not working with a traditional Salesforce pipeline. When you create a non-Salesforce environment, Copado automatically creates the corresponding Credential record for you.
Heroku credential record

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.
App name system property

Pipeline Record

The next step is to create the Pipeline record. To do that, follow these steps:

  1. Navigate to the Pipelines tab and click on New.
  2. Give your pipeline a name and select the Git Repository record you created in a previous step.
  3. Select the main branch, which is usually master (or main if you use GitHub as Git provider) and flag the Active checkbox.
  4. In the Platform picklist field, select Heroku
  5. 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.
  6. 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.
  7. 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:
API Key System Property

Pipeline Connections

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. 

Pipeline connections

Project Record

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.

Heroku project

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.

How did we do?