Global Enviroment Variables That Span All Projects


#1

Continuing the discussion from Circle 2.0: Global Environment Variables:

Customer requested that they have the ability to create global enviroment variables that span all projects.


Organisation wide environment variables
#2

+1, this would save so much time having global variables, we have some 20+ projects in Circle and have common vars between all of them. Also the option to view a variable as once its been set you cant see what the value was.


#3

Hi Michael,

good to hear that you are following it. It’s a long awaited feature. See this post from 2015.


#4

We would find this feature super useful. Kinda odd copying the same variables in all our projects.


#5

Ideally, we might like some kind of globally shared secret store, with the additional ability to scope access to these secrets.

e.g. repo A can see Secrets X and Y, repo B can see Secrets Y and Z, repo C can’t see any secrets
-or-
all public repos can see X and Y, all private repos can see Z


Context:

We currently have 200+ repos, each of which needs to have env vars set for builds. Currently, we have a tool to bootstrap creating new projects, which also sets up Circle CI env vars.

The way we think about environment variables in CircleCI repos is that we re-use some secrets across repos, but we separate them by scope (public vs private). the idea is that we don’t want an accidental leak of variables in a public repo’s build to allow privilege escalation to access private repos.

For example, public repos could include npm, dockerhub, and gh creds that are scoped to only do things with public repos. And private repos include npm, dockerhub, and gh creds that are scoped to do things with private repos (e.g. downloading private dependencies).


#7

Hi,

Thank you for filing this feature request.

We are actively looking at implementing a similar functionality in our product.

Stay tuned for more updates.


#8

+1 this would save loads of time.


#9

@rishimkumar implemented an “Import variables” button. He asks for feedback. See his post in the corresponding 1.0 thread.


#10