Global environment
option to set env variables across all steps
#3661
Labels
environment
option to set env variables across all steps
#3661
Clear and concise description of the problem
Right now, there only seems to be a way to define global env variables for the entire CI, rather than a single pipeline itself.
In addition is this from what I understand only something an admin can do, meaning users on a shared instance may not have a way to easily define an environment that is accessible across all steps (See "Alternatives" for the ones I know of and their (mostly) cons).
Suggested solution
A global
environment
option should be implemented, which allows you to define the environment variables you want to use across all steps.I'm unsure if this global one should be overridable by a step-level environment setting with the same name.
Example:
Alternative
From what I understand and gathered are there these possible alternatives, which all have some downsides to them:
-
Using a secret for sharing a non-secret value globally seems wrong.-
doesn't allow using other env variables to be processed(? Unsure about this one).+
It's available across all steps and can also be used in plugin settings.-
Depending on the image set may require different commands to set and get.-
You can't pull the env in a plugin (unless there is an aproach to run commands before the image execution somehow).-
Requires to pull the envvars file on every step to make it available.+
Above negative allows only exposing the env to specific steps.Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: