Multiple Contexts

I’m splitting some secrets for things like github, dockerhub, etc into different contexts, but it appears I can only specify one context per job. Am I missing something obvious? Couldn’t find an example with multiples.

Also, under contexts it states they are “public”, which implies there is some way to limit scope on these, but also couldn’t find anything.

Thanks in advance!

3 Likes

I did the same thing and I can’t split my workflow in multiple jobs since we are building Docker Image.
Any feedback on this issue ?

For now, I ended up putting all env vars in the same context which is less flexible …

I did the same thing – dumped them all into 1 context – but that felt dirty. The idea that all projects will require ALL secrets is just silly.

Thanks for keeping my thread/question alive – not getting much love :frowning:

Would love some official word on support for specifying multiple contexts on a job so they can be managed in a more obvious way.

I also would love to see allowed multiple contexts per job. Currently having to choose only one is a limitation for us

The usecase for multiple contexts is simple: share the same env between different workflows.

F.e. one context is describing environment connection details (f.e. SSH creds, or AWS key, or kubeconfig) can be used among different projects in case if environment is used for multiple applications (microservices). Other contexts are used to store env vars specific for app/branch.

1 Like

Any updates on this from the CircleCI team?

Would be far better to be able to segregate environment variables into different contexts!

1 Like

We would very much love this feature as well. Managing many micro-services is becoming a real pain :frowning:

1 Like

I’ve added an idea suggestion for this on CircleCI’s ideas page. I have no clue how feature suggestions are prioritized at Circle, but it seems like voting for ideas from this ideas page has more sway than forum discussions. That’s just a guess, though.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.