Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 2.41 KB

File metadata and controls

73 lines (51 loc) · 2.41 KB

Contributing to gomnibus-gitlab

Prerequisites

  • Go 1.26+
  • gomnibus installed: go install github.com/syntaxroot-cc/gomnibus/cmd/gomnibus@latest
  • Git submodules initialized: git submodule update --init

Local setup

git clone https://github.com/syntaxroot-cc/gomnibus-gitlab
cd gomnibus-gitlab
git submodule update --init
git config core.hooksPath .githooks

Pre-commit hook

A pre-commit hook runs gofmt on Go files. Enable it after cloning:

git config core.hooksPath .githooks

Validating definitions

Run the full validation suite (parses all YAML, checks checksums, resolves deps):

go test ./validate/...

Or use gomnibus's built-in validator:

gomnibus validate gitlab

Adding a software definition

  1. Create config/software/<name>.yaml following the gomnibus software YAML schema.
  2. Re-run go test ./validate/... — the suite will catch missing fields, missing checksums, and unresolvable dependencies.
  3. Add the new component to config/projects/gitlab.yaml under dependencies:.

Software definition conventions

  • All embedded libraries (not GitLab services) install to ${install_dir}/embedded/ by using an explicit --prefix=${install_dir}/embedded in command: configure steps.
  • GitLab services install to ${install_dir}/embedded/service/<name>/.
  • Go binaries install to ${install_dir}/embedded/bin/.
  • Use env: at the top level (not per-step) to set PKG_CONFIG_PATH, LDFLAGS, and CPPFLAGS so dependency libraries are found during configure and link.
  • configure: step auto-prepends --prefix=${install_dir} — use command: instead when you need --prefix=${install_dir}/embedded.
  • ${install_dir}, ${src_dir}, and ${build_dir} expand in all step arg lists.

Version pinning

To override a component version without modifying the software definition, add an overrides: block to config/projects/gitlab.yaml:

overrides:
  - name: postgresql
    version: "16.8"

CI

All three jobs must pass:

Job What it runs
Validate go test -race ./validate/... on Linux/macOS/Windows
Lint golangci-lint v2 + govulncheck (Linux only)
Schema check gomnibus validate gitlab — verifies the project definition is complete