1
0
Fork
You've already forked go-plugin
0
Woodpecker CI plugin library
  • Go 96.9%
  • Makefile 2.1%
  • Nix 1%
2026年03月07日 00:05:47 +00:00
.woodpecker chore(deps): update docker.io/woodpeckerci/plugin-ready-release-go docker tag to v4 ( #78 ) 2026年02月28日 08:13:43 +01:00
cli feat: add custom cli flags ( #48 ) 2025年04月23日 18:01:11 +00:00
.gitignore Add .gitignore ( #28 ) 2024年07月22日 21:37:31 +00:00
.golangci.yaml chore(deps): update docker.io/woodpeckerci/plugin-ready-release-go docker tag to v4 ( #78 ) 2026年02月28日 08:13:43 +01:00
CHANGELOG.md 🎉 Release 1.0.2 ( #68 ) 2026年01月09日 02:04:36 +01:00
commit.go Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00
flags.go Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00
flake.lock Add nix flake ( #31 ) 2024年07月22日 21:37:09 +00:00
flake.nix Add nix flake ( #31 ) 2024年07月22日 21:37:09 +00:00
forge.go Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00
go.mod chore(deps): update dependency go to v1.26.1 2026年03月07日 00:05:47 +00:00
go.sum fix(deps): update module github.com/urfave/cli/v3 to v3.7.0 ( #80 ) 2026年03月03日 09:17:44 +01:00
http.go Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00
LICENSE Initial implementation 2023年01月08日 04:53:03 +02:00
logger.go Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00
Makefile feat: add custom cli flags ( #48 ) 2025年04月23日 18:01:11 +00:00
metadata.go Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00
metadata_test.go Bump urfave/cli to v3.2.0 ( #49 ) 2025年04月24日 06:44:11 +00:00
pipeline.go Bump urfave/cli to v3.2.0 ( #49 ) 2025年04月24日 06:44:11 +00:00
plugin.go Bump urfave/cli to v3.2.0 ( #49 ) 2025年04月24日 06:44:11 +00:00
plugin_test.go Bump urfave/cli to v3.2.0 ( #49 ) 2025年04月24日 06:44:11 +00:00
README.md Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00
renovate.json Configure Renovate ( #4 ) 2023年10月16日 16:52:34 +00:00
repo.go Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00
step.go Bump urfave/cli to v3.2.0 ( #49 ) 2025年04月24日 06:44:11 +00:00
system.go Migrate to github.com/urfave/cli/v3 ( #29 ) 2024年07月22日 23:32:14 +00:00

Library for creating Woodpecker CI plugins

Provides basic structure and helpers to load Woodpecker CI environment variables while also supporting reading Drone CI environment variables where available.

Adds logging support based on zerolog library and allows configurable HTTP client library.

Builtin settings

Settings Name Environment variable Default Description
log_level - info Sets log level (panic, fatal, error, warn, info, debug, trace)
skip_verify - false - Skip verification of TLS certificate
SOCKS_PROXY none SOCKS5 proxy to use for connections
SOCKS_PROXY_OFF none Do not use SOCKS5 proxy

Creating plugin

packagemainimport("context""codeberg.org/woodpecker-plugins/go-plugin""github.com/rs/zerolog/log""github.com/urfave/cli/v3")typeSettingsstruct{// TODO: Plugin settingsSampleFlagstring}typePluginstruct{*plugin.PluginSettings*Settings}func(p*Plugin)Flags()[]cli.Flag{return[]cli.Flag{// TODO: Add flags&cli.StringFlag{Name:"sample.flag",Usage:"sample flag",Sources:cli.EnvVars("PLUGIN_SAMPLE_FLAG"),Destination:&p.Settings.SampleFlag,},}}func(p*Plugin)Execute(ctxcontext.Context)error{// TODO: Implement executionlog.Debug().Msg("executed")returnnil}funcmain(){p:=&Plugin{Settings:&Settings{},}p.Plugin=plugin.New(plugin.Options{Name:"sample-plugin",Description:"Sample plugin",Flags:p.Flags(),Execute:p.Execute,})p.Run()}