mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-05-09 08:46:36 +00:00
Add global var note (#4956)
Co-authored-by: Robert Kaussow <xoxys@rknet.org>
This commit is contained in:
parent
e053cd44d9
commit
836cbbcaed
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user