Hi all!
I’m new to CircleCi so hopefully I’m just missing something obvious but I can’t seem to access any of the environment variables I created in the settings GUI.
Say I have the config of:
deployment:
branch: development
commands:
The script runs and but anytime I try and access an environment variable with $MY_ENV_VAR it is empty.
(also, fwiw printenv
works and doesn’t show my custom env variables either.)
Is this even possible?
Thanks for the help!
1 Like
Did you find a resolution or workaround for this?
Seeing this I think of the following questions:
- How are you setting these variables?
- Are the variable names using anything other than alphanumeric characters?
- Is this a fork/PR build?
- Was a new build (from a new commit) done in order to test for the environment variable?
@ericnakagawa and @ktstowell can you take a look at this post and let me know if its the same issue that I answered there: Gemnasium and CircleCI - GEMNASIUM_TOKEN seems to not get picked up
If this is not a forked PR build, please give me a build URL so I can take a look.
1 Like
Ah, yes. In my case it is a forked PR! The justification makes sense. Any way for this to be added to docs?
Where would you expect to see this information being added in Docs? To the page about environment variables? A page explaining all about forks and PRs and how settings might change? Something else?
This is actually in the docs, but might be buried away somewhere. https://circleci.com/docs/1.0/fork-pr-builds/#security-implications
cc @FelicianoTech maybe we can find a better place to put this?