Which environment variables are available when/where?
I have a really hard time finding out which environment variables are available when and where.
I have masked group variables. Which I use in an included component. These are available both on a shell and docker executor when running in normal script mode.
When running in step mode. The list of variables is very limited (Using the env executable). As there isn't a way to list all variables in the job/env context in the step runner. It is very difficult to check which variables are available.
But the masked variables are not in the env context.
When running also a dind service, the job variables are available with a DOCKER_ENV_ prefix. Though when any global variable is passed as an input to a step, the value is empty. Both with and without dind. When a global variable is passed as an environment variable using the env mapping of the step. The variable isn't expanded. So the result will be bla=${MY_GLOBAL_VARIABLE}. And it is only available through the env executable and not via the env context
Please clarify what currently should be available and what any future plans are.