Multiple Contexts

2.0
contexts

#1

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!


#2

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 …


#3

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.


#4

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


#5

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.


#6

Any updates on this from the CircleCI team?