Example for a basic configuration service
Go to file
Lukas Bachschwell 838c664767
Add filter example
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2022-02-27 22:31:48 +01:00
.env.example Add filter example 2022-02-27 22:31:48 +01:00
.gitignore Initial 2022-02-27 20:18:27 +01:00
central-pipeline-config.yml Initial 2022-02-27 20:18:27 +01:00
go.mod Adjust module path 2022-02-27 22:31:26 +01:00
go.sum Correctly load .env file 2022-02-27 22:31:40 +01:00
main.go Correctly load .env file 2022-02-27 22:31:40 +01:00
Readme.md Initial 2022-02-27 20:18:27 +01:00

Woodpecker CI Configuration Service example

This repository provides a very simplistic example of how to set up an external configuration service for Woodpecker CI The external service gets a HTTP POST request with information about the repo, current build, and the configs that would normally be used. It can then decide to acnowledge the current configs (By returning HTTP 204), or overriding the configurations and returning new ones in the response

Usecases for this system are:

  • Centralized configuration for multiple repositories at once
  • Preprocessing steps in the pipeline like templating, macros or conversion from different pipeline formats to woodpeckers format

This service is written in go, run using go run .. Then configure your woodpecker instance to point to it and configure the same secret. See Woodpeckers documentation here

eg:

# Server
# ...
WOODPECKER_CONFIG_SERVICE_ENDPOINT=http://<service>:8000/ciconfig
WOODPECKER_CONFIG_SERVICE_SECRET=mysecretsigningkey