Skip to main content

Build System

Purpose: For contributors, provides Mise tasks, CI/CD pipelines, and artifact publishing details.

Overview

The openCenter ecosystem uses three distinct build systems, one per language:

RepositoryLanguageBuild ToolTask RunnerArtifacts
openCenter-cliGo 1.25.2go buildmiseBinary (bin/opencenter)
openCenter-AirGapPython 3.10+setuptoolspytest / pipZarf packages (.tar.zst)
headlamp-branding-pluginTypeScriptwebpackpnpmPlugin bundles (dist/)

openCenter-cli (Go + mise)

mise (.mise.toml) defines all build, test, and release tasks. Key tasks:

TaskCommandDescription
buildmise run buildCompiles binary with version ldflags to bin/opencenter
build-linuxmise run build-linuxCross-compiles for linux/amd64
build-allmise run build-allBuilds for linux/amd64, linux/arm64, darwin/amd64, darwin/arm64
testmise run testRuns go test ./internal/...
godogmise run godogRuns BDD tests via godog (skips @wip scenarios)
test-propertiesmise run test-propertiesRuns property-based tests (TestProperty*)
fmtmise run fmtRuns gofmt -w .
schemamise run schemaGenerates JSON schema to schema/cluster.schema.json
releasemise run release <version>Builds all platforms + generates release notes

mise also manages tool versions. The [tools] section in .mise.toml pins golang, kubectl, kind, and helm to latest.

Version information is injected at build time via Go ldflags:

go build -ldflags "-X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT} ..."

openCenter-AirGap (Python + setuptools)

Build configuration lives in pyproject.toml. The package uses setuptools with src/ layout.

CommandDescription
pip install -e ".[dev]"Install in editable mode with dev dependencies
pytestRun test suite (strict markers, 300s timeout)
pytest --cov=srcRun with coverage (minimum 80%)
black src/ tests/Format code (line length 100)
mypy src/Type check (strict mode)
pylint src/opencenter_build/Lint

The CLI entry point is opencenter-airgap, registered via [project.scripts] in pyproject.toml.

headlamp-branding-plugin (TypeScript + pnpm)

The monorepo uses pnpm workspaces. pnpm-workspace.yaml includes plugins/*.

CommandDescription
pnpm installInstall all workspace dependencies
pnpm run buildBuild all plugins (webpack production)
pnpm run devStart dev servers for all plugins
pnpm testRun Jest tests across all plugins
pnpm run lintESLint across all plugins
pnpm run formatPrettier across all plugins

Target a specific plugin with --filter:

pnpm --filter @opencenter/headlamp-plugin-branding run build

CI/CD pipelines

All repositories use GitHub Actions. Common patterns:

  • PRs trigger lint, test, and build checks
  • Tags trigger release workflows
  • The CLI release task (mise run release <version>) generates platform binaries and release notes, then publishes via gh release create
  • AirGap builds produce Zarf packages (.tar.zst) as release artifacts
  • Headlamp plugins are packaged as ZIP files attached to GitHub releases

Knowledgebase (Jekyll)

The knowledgebase site uses Jekyll 3.8 with Bundler:

bundle install
bundle exec jekyll serve

See Website Development Setup for details.