Configuration server for Woodpecker CI, to centralize the workflows.
  • Go 94.5%
  • Dockerfile 5.5%
Find a file
renovate-bot 110787562c
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/tag/release Pipeline was successful
Update all dependencies #25
Merged automatically
2026-04-19 07:09:52 +00:00
.woodpecker Update all dependencies #25 2026-04-19 07:09:52 +00:00
internal Add notification (#7) 2026-04-11 17:55:47 +00:00
workflows Update all dependencies #25 2026-04-19 07:09:52 +00:00
.gitignore implement a test config server 2026-04-10 01:10:47 +02:00
.goreleaser.yaml implement a test config server 2026-04-10 01:10:47 +02:00
.markdownlint.json add docs 2026-04-10 12:42:32 +02:00
.prettierrc add docs 2026-04-10 12:42:32 +02:00
.trivyignore add vulnerabiltiy exception 2026-04-11 20:22:17 +02:00
Containerfile fix Containerfile 2026-04-10 12:47:08 +02:00
go.mod Update module code.thinkaboutit.tech/pandora/woodpecker-utils.gopack to v1.2.0 #22 2026-04-18 07:09:40 +00:00
go.sum Update module code.thinkaboutit.tech/pandora/woodpecker-utils.gopack to v1.2.0 #22 2026-04-18 07:09:40 +00:00
LICENSE add docs 2026-04-10 12:42:32 +02:00
main.go bump version number 2026-04-11 00:05:50 +02:00
README.md add prod image 2026-04-10 13:09:33 +02:00
renovate.json Migrate Renovate config (#6) 2026-04-10 22:12:42 +00:00

Woodpecker Configuration Server

Woodpecker CI has an ability to use a server as external configuration server, see in document. This application start an endpoint that can receive signal from Woodpecker server and respond accordingly.

Structure of workflows

My repositories are organized with a unique suffix, for example:

  • foo.goapp: This is an application written in Go
  • foo.gopack: Package for Go project
  • foo.woodpecker: Woodpecker CI configuration

The workflows can be found in the workflows directory. Each directory is checked as suffix. The directory contains further directories which are events. And those directories contains the workflows.

Settings

The CLI settings and their environment variable pairs can be found in config file.

var CLIParameters struct {
    Serve struct {
        Port          int    `short:"p" env:"APP_SERVE_PORT"     default:"5000"    help:"Listen port"`
        Hostname      string `short:"H" env:"APP_SERVE_HOSTNAME" default:"0.0.0.0" help:"Address or host that port is binded"`
        WoodpeckerURL string `          env:"APP_SERVE_WP_URL"                     help:"Address of woodpecker CI"`
    } `cmd:"" help:"Start and listen server"`
    List struct {
        Suffix   string `short:"s" env:"APP_LIST_SUFFIX"   help:"List action within suffix"`
        Action   string `short:"a" env:"APP_LIST_ACTION"   help:"List workflows within suffix.action"`
        Workflow string `short:"w" env:"APP_LIST_WORKFLOW" help:"Display content of suffix.action.workflow.yaml file"`
    } `cmd:"" help:"List the workflows"`
    Version struct{} `cmd:"" help:"Version information"`
}

Usage

The simplest way is to put into the same pod, than Woodpecker server, and they can communicate via 127.0.0.1.

[Unit]
Description=Woodpecker CI configuration server
StartLimitBurst=5
StartLimitIntervalSec=90

[Container]
Exec=serve
Image=code.thinkaboutit.tech/pandora/woodpecker-config-server.goapp:latest
Pod=wood.pod

Environment="APP_SERVE_WP_URL=http://127.0.0.1:8000"
Environment="PLUGIN_DEBUG=true"

[Service]
Restart=on-failure
RestartSec=2

[Install]
# If you want auto-start after reboot
WantedBy=default.target

In the Woodpecker Quadlet, following settings must be specified:

Environment="WOODPECKER_CONFIG_EXTENSION_ENDPOINT=http://127.0.0.1:5000/ciconfig"
Environment="WOODPECKER_EXTENSIONS_ALLOWED_HOSTS=loopback"

Note

If they are not in the same pod, then the allowed hosts might be different, check document.