These are custom customer files that end up at: https://pool-$customer.adhese.com/tag/*.
Usually it's Adhese sdk tag.js with some customer-specific customizations around it.
- Fork
adhese/jstags-templaterepo asjstagsinto your organisation eg.your-org/jstags - Clone your fork locally
- Give
adhese-ciGitHub user access to the forked repo
- Customer -related change? -> merge to your fork
your-org/jstags - Github actions build/release script -related updates? -> make a PR in
adhese/jstags-template
- (one time action) Add
templateas a remote:git remote add template git@github.com:adhese/jstags_template.git - To synchronize with the upstream changes run:
git fetch template && git merge template/main
Supported types of jstags:
- NPM-based (
vitedir)
All the build process is managed with NPM vite/package.json file.
- All the dependencies are pulled from the NPM repo.
npm run buildis supposed to generate a build artifact invite/dist/$customer.npm run serve [customer_name], eg.npm run serve customerxwill start a dev http server and host customer resources athttp://localhost:8080/tag/resource_name.here
├── common # resources shared between multiple customers
│ ├── partials # html templates/partials
│ └── src # generic *.ts utils
├── customers
│ ├── customerx # files specific for customerx
│ │ ├── bye.html
│ │ ├── hello.html
│ │ └── src
│ └── customery # files specific for customery
│ ├── hello.html
│ └── src
Single customer file-structure could look like:
├── bye.html
├── hello.html # html file to be published at https://pool-customerx.adhese.com/tag/hello.html
└── src
├── _bye.ts # private resource, it won't be available at any predictable url
├── _hello.ts
├── lib.ts # js lib to be published at https://pool-customerx.adhese.com/tag/lib.js
└── tag.ts
- Make a PR with jstag changes for customer
xyz - Deploy to test
- Run
PublishGitHub action with parameters:- branch: your-pr-branch
- customer:
xyz - env:
test
- Check your results at
https://pool-xyz.adhese.com/tag/test/*.
- Run
- Merge the PR
- Deploy to prod happens automatically
- Check your results at
https://pool-xyz.adhese.com/tag/*.
- Check your results at
- Add the new dir structure and files for the new customer
- Run the
PublishGitHub action - Declare (or ask Adhese support to) the new customer in the jstags config in the Projects repo
The Publish github action:
- builds the artifact
- converts it to an NPM package
This is then picked up by the workflow in projects repo, which:
- downloads the package
- uploads it to the correct s3 location (with --delete flag, all the manual s3 changes will be discarded)