Tom
Tom

Reputation: 1565

Setting environment variables for different environments in CircleCI

Is there a better way to set environment variables for secrets for dev, staging, prod etc than DEV_SECRET_KEY and PROD_SECRET_KEY? Is the best way to just use a prefix for each environment?

Upvotes: 1

Views: 305

Answers (1)

FelicianoTech
FelicianoTech

Reputation: 4017

You should use CircleCI Contexts.

Create a context for each environment, and then each context would have SECRET_KEY set but the value will be specifically for that environment in that context.

Upvotes: 2

Related Questions