Base template to deploy your next destination function with
- Click
Use This Template
above (If Segment PS, add toSegment Services Engineering
Organization
nvm use
(to get the right version of NodeJS)- As of 2023/02/22, Segment Source & Destination Functions require NodeJS 14.19.3
- If needed, install
nvm
npm install
(to install npm dependencies)
npm run test
- GitHub Actions workflow also runs tests before deploying
- Tests are created in
src/index.test.js
- Create GitHub Environments here (DEV, QA, PROD, etc)
DEV
is enabled by default in the deployDestinationFunction.yml file (note: this links to the environments in the Template Repo)- Navigate to settings -> environments in your Function Repo
- Create Function in Segment Workspace
- Create Public API Token to allow for deploying
- Add the following Environment Secrets
FUNCTION_ID
- Be sure to include
dfn_
- Be sure to include
PUBLIC_API_TOKEN
- Once changes look good in the DEV environment, uncomment the QA section from the deployDestinationFunction.yml file.
- Push changes to your branch
- Add the label
!!_RELEASE_TO_QA
to the PR to deploy it to QA