hubspot-ui-extension-sales-advice

0.2.0 • Public • Published

Sales Advice extension

Local setup

Full local environment documentation

  • yarn install to install dependencies
  • npx hs init if you haven’t already done so to create a config file hubspot.config.yml
  • npx hs auth to authenticate Hubspot environment, for local development use 'Finanzchef24 Local'
  • copy env.example.env to .env and set required environment variables in .env file
  • npx hs project upload to upload changes or hs project dev to develop locally

Secret management

Hubspot has it's own way of secret management for serverless functions, please see (documentation)[https://developers.hubspot.com/docs/platform/serverless-functions#managing-secrets] for more information. For local development you can use .env file. To see list of secrets run hs secrets list

Release

NOTE: To release locally follow steps in 'Local Setup'

To release to stage and production environment in Hubspot we need to:

  1. set environment variable in CircleCI.
  2. set secrets in Hubspot

The hs binary at the moment has only 'interactive' process where it opens a browser for the user to copy accesskey and there are no way to run it in not interactive way to provide accesskey directly to the command line in CI environment. That's why we store the whole file as an environment variable.

Steps

  1. if you have any hubspot.config.yml in root folder of the package, rename it to hubspot.config.yml.local, so we make sure there is no hubspot.config.yml
  2. run npx hs init and follow the process for Hubspot environemet
  3. now you have hubspot.config.yml
  4. convert it to base64 cat hubspot.config.yml | base64 -w 0
  5. copy the value into an environment variable HUBSPOT_EXTENSION_CONFIG_STAGE for stage or HUBSPOT_EXTENSION_CONFIG_PRODUCTION for production in CircleCI
  6. make sure all secrets listed in serverless.json are set, see hs secrets --help for more information
  7. remove hubspot.config.yml
  8. rename hubspot.config.yml.local to hubspot.config.yml

Readme

Keywords

none

Package Sidebar

Install

npm i hubspot-ui-extension-sales-advice

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

7.85 kB

Total Files

20

Last publish

Collaborators

  • vasergen