CircleCI
How it works
CircleCI stores one Ennote token in a context or project environment variable. The job installs the Ennote CLI, and ennote secret get <secret> -- <command> runs the command with the keys of the secret as environment variables. See the CI/CD overview for the common setup.
1. Create a token
Create a Personal Access Token with an expiration, and copy it.
2. Store it in CircleCI
Use a context so you can share the token between projects and restrict who can use it: open Organization Settings → Contexts → Create Context, name it ennote, and add the environment variable ENNOTE_TOKEN with the token.
For a single project, you can instead add ENNOTE_TOKEN under Project Settings → Environment Variables.
3. Add the config
version: 2.1
jobs:
deploy:
docker:
- image: cimg/node:lts
environment:
ENNOTE_ORGANIZATION_ID: org_123
ENNOTE_WORKSPACE_ID: wrk_prod
ENNOTE_DO_NOT_TRACK: "1"
steps:
- checkout
- run:
name: Install the Ennote CLI
command: curl -sSfL https://get.ennote.io/get-cli.sh | sh
- run:
name: Run database migrations
command: ennote secret get db-credentials -- npm run migrate
- run:
name: Deploy
command: ennote secret get aws -- ./deploy.sh
workflows:
deploy:
jobs:
- deploy:
context: ennote
filters:
branches:
only: main
Replace org_123, wrk_prod, db-credentials and aws with your organization ID, workspace ID and secret names. CircleCI convenience images (cimg/*) include curl and allow sudo, so the install script works as is.
FAQ
How do I limit who can deploy with the token?
Add a security group or expression restriction to the ennote context, so only allowed users or branches can run jobs that use it.
Do I need ennote auth login?
No. With ENNOTE_TOKEN set, the CLI authenticates headlessly (ennote auth).
Need Help?
If you encounter any issues or have questions, don't hesitate to contact support. Our team is here to assist you with any challenges you might face.
Bitbucket Pipelines
Use Ennote secrets in Bitbucket Pipelines: store an Ennote token as a secured repository or deployment variable, install the Ennote CLI in the step, and inject secrets with ennote secret get.
TeamCity
Use Ennote secrets in TeamCity: store an Ennote token as a password parameter exposed as an environment variable, and inject secrets into build steps with ennote secret get.