From 836cbbcaedb50fc3baaf7a71609881e1d85145a7 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Fri, 14 Mar 2025 15:51:03 +0200 Subject: [PATCH] Add global var note (#4956) Co-authored-by: Robert Kaussow --- .../30-administration/10-configuration/12-forges/100-addon.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/30-administration/10-configuration/12-forges/100-addon.md b/docs/docs/30-administration/10-configuration/12-forges/100-addon.md index fecd662bc..2434fee06 100644 --- a/docs/docs/30-administration/10-configuration/12-forges/100-addon.md +++ b/docs/docs/30-administration/10-configuration/12-forges/100-addon.md @@ -41,6 +41,10 @@ Directly import Woodpecker's Go packages (`go.woodpecker-ci.org/woodpecker/v3`) In the `main` function, just call `"go.woodpecker-ci.org/woodpecker/v3/server/forge/addon".Serve` with a `"go.woodpecker-ci.org/woodpecker/v3/server/forge".Forge` as argument. This will take care of connecting the addon forge to the server. +:::note +It is not possible to access global variables from Woodpecker, for example the server configuration. You must therefore parse the environment variables in your addon. The reason for this is that the addon runs in a completely separate process. +::: + ### Example structure ```go