TeamCity
How it works
TeamCity stores one Ennote token as a password parameter. Parameters that start with env. are passed to build steps as environment variables, so the CLI finds ENNOTE_TOKEN automatically. ennote secret get <secret> -- <command> then 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 TeamCity
In the project (or build configuration) settings, open Parameters → Add new parameter and add:
| Name | Kind | Value |
|---|---|---|
env.ENNOTE_TOKEN | Environment variable, spec Password | the token |
env.ENNOTE_ORGANIZATION_ID | Environment variable | your organization ID |
env.ENNOTE_WORKSPACE_ID | Environment variable | your workspace ID |
env.ENNOTE_DO_NOT_TRACK | Environment variable | 1 |
A Password parameter is hidden in the UI and masked in build logs. Parameters set on the project are inherited by all its build configurations.
3. Install the CLI on your agents
TeamCity agents often run without root. Install the CLI once on each agent, or in the agent image, as root:
curl -sSfL https://get.ennote.io/get-cli.sh | sh
4. Add the build steps
Add a Command Line build step with Custom script:
ennote secret get db-credentials -- npm run migrate
ennote secret get aws -- ./deploy.sh
Replace db-credentials and aws with your secret names.
Kotlin DSL
If you keep your settings in Kotlin DSL, the same configuration looks like this. Generate a secure token for the Ennote token in Project Settings → Versioned Settings → Tokens and reference it by its credentialsJSON: ID, so the value is not stored in your repository:
object Deploy : BuildType({
name = "Deploy"
params {
password("env.ENNOTE_TOKEN", "credentialsJSON:<token-id>")
param("env.ENNOTE_ORGANIZATION_ID", "org_123")
param("env.ENNOTE_WORKSPACE_ID", "wrk_prod")
param("env.ENNOTE_DO_NOT_TRACK", "1")
}
steps {
script {
name = "Deploy"
scriptContent = "ennote secret get aws -- ./deploy.sh"
}
}
})
FAQ
Do I need ennote auth login on the agent?
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.
CircleCI
Use Ennote secrets in CircleCI: store an Ennote token in a context or project environment variable, install the Ennote CLI in the job, and inject secrets into steps with ennote secret get.
AWS CodeBuild
Use Ennote secrets in AWS CodeBuild and CodePipeline: keep the Ennote token in AWS Secrets Manager, load it in buildspec.yml, install the Ennote CLI and inject secrets into build and deploy commands with ennote secret get.