Skip to main content

Publish & install a plugin

Publish a plugin privately​

To publish a plugin to Portal Cloud, contact Spotify to receive a publishing token for your Portal Cloud instance.

Next, set up your local environment to publish to your Portal Cloud instance:

  1. Configure your plugin's package.json to add a registry key:
package.json
{
"name": "@portal-internal/plugin-example",
"version": "0.1.0",
...
"publishConfig": {
"registry": "https://<company>.spotifyportal.com/api/plugin-installer/registry/npm"
},
...
}
  1. Add a .yarnrc.yml with the npmAuthToken key defined with an environment variable:
npmAuthToken: ${PORTAL_PUBLISHING_TOKEN}
  1. Export the publishing token you received from Spotify:
export PORTAL_PUBLISHING_TOKEN=<token>
  1. Build your plugin:
# From a monorepo root directory
$ yarn tsc && yarn build:all

# From the plugin directory
$ yarn tsc && yarn build
  1. Publish your plugin:
# From a monorepo root directory
yarn workspace @portal-internal/plugin-example npm publish

# From the plugin directory
yarn npm publish
  1. Repeat Step 5 for any other plugin packages (e.g. backend or common packages).

When publishing subsequent versions, be sure to increment the version field in your package.json file. This can be done manually, or with a change management tool like changesets.

Publish a plugin as an Authorized Portal Partner​

To become an authorized Portal Partner, please start by submitting an application, and someone from our partnerships team will reach out. Please include all details on the plugin that you have built, including how you intend to maintain support of the published plugin.

Install a plugin in Portal​

After publishing your plugin, it can be installed from the Config Manager in Portal. When signed in as an authorized user, click Add Plugin and enter the npm package name of your plugin. Enter additional package names if your plugin has multiple packages (e.g. a frontend and a backend package).

From this point on, the installation, configuration, upgrade, and uninstallation of your plugin works the same as any community or third-party packages installed in Portal.

  1. Navigate to Config Manager
  2. Select Add a plugin

Add Plugin button on Config Manager page

  1. Enter all the package dependencies required for your plugin
  2. Once all packages have been added, select Install

View when adding plugins to be installed

View when installing the added packages

  1. Once all packages have been installed successfully, select Finish

View when packages have been installed successfully

  1. You can now manually test your plugin to see how it works in Portal
note

Your plugin may install successfully but is not guaranteed to work as expected. We ask to manually test to ensure it’s working properly. Many plugins rely on entity annotations in order to dynamically pull content; if this is the case for any of your plugins, make the relevant PRs to your catalog-info.yaml files to include the required annotations.