woodpecker/docs/versioned_docs/version-2.6/30-administration/22-backends/50-custom-backends.md
2024-06-13 19:31:54 +02:00

659 B

Custom backends

If none of our backends fits your usecases, you can write your own.

Therefore, implement the interface "go.woodpecker-ci.org/woodpecker/woodpecker/v2/pipeline/backend/types".Backend and build a custom agent using your backend with this main.go:

package main

import (
  "go.woodpecker-ci.org/woodpecker/v2/cmd/agent/core"
  backendTypes "go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
)

func main() {
  core.RunAgent([]backendTypes.Backend{
    yourBackend,
  })
}

It is also possible to use multiple backends, you can select with WOODPECKER_BACKEND between them.