From 73481dfa0c16d42532274890038ff80348e68f74 Mon Sep 17 00:00:00 2001 From: Laszlo Fogas Date: Tue, 19 May 2020 14:31:18 +0200 Subject: [PATCH] Document global environment variables --- docs/docs/environment-variables.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docs/environment-variables.md b/docs/docs/environment-variables.md index f7c17d176..dbb14e886 100644 --- a/docs/docs/environment-variables.md +++ b/docs/docs/environment-variables.md @@ -92,6 +92,14 @@ This is the reference list of all environment variables available to your build | `DRONE_PULL_REQUEST` | pull request number | | `DRONE_DEPLOY_TO` | deployment target (ie production) | +## Global environment variables + +If you want specific environment variables to be available in all of your builds use the `DRONE_ENVIRONMENT` setting on the Woodpecker server. + +```.env +DRONE_ENVIRONMENT=first_var:value1,second_var:value2 +``` + ## String Substitution Woodpecker provides the ability to substitute environment variables at runtime. This gives us the ability to use dynamic build or commit details in our pipeline configuration.