Parent directory

AGENTS.md

926 bytes

soft-builder

Build worker for Soft Serve repositories. It accepts internal HTTP build requests and uses BuildKit to publish images.

Structure

  • main.go: startup and dependency wiring.
  • config.go: environment configuration.
  • http.go: HTTP request validation, handlers, and current build status.
  • worker.go: build queue, Git archive extraction, and BuildKit execution.
  • db.go: SQLite bootstrap and build-result persistence.

Behavior

  • Only refs/heads/main and valid Docker-tag refs/tags/* refs build images.
  • Main builds publish the commit SHA and main; tag builds publish the commit SHA and Git tag.
  • DATABASE_PATH defaults to /work/builds.db. Mount its directory for persistence across container replacement.
  • Keep the builder internal. Do not expose its HTTP port through a public proxy.

Validation

Run golangci-lint run ./... and golangci-lint run ./... (might make changes)