Development¶
Repo layout¶
cmd/jeballto-gitlab-executor/main.go
internal/app/app.go
internal/api/client.go
internal/config/config.go
internal/gitlab/context.go
internal/runner/ssh.go
internal/state/store.go
examples/
scripts/
Important implementation areas¶
internal/app/app.goowns the stage orchestration and most lifecycle logicinternal/api/client.gocontains API request shaping and retryable error handlinginternal/state/store.gois the file-backed truth for multi-process coordinationinternal/runner/ssh.gohandles the OpenSSH transport and askpass helper
Common commands¶
Build:
make build
Build with an explicit version:
make VERSION=1.0.0-beta.1 build
Test:
make test
Format or vet commands can be added separately, but the current repo baseline is build plus Go tests.
Docs workflow¶
Serve the docs locally:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements-docs.txt
python -m mkdocs serve
Build static HTML:
python -m mkdocs build
Useful review topics¶
When changing behavior, pay close attention to:
- image resolution precedence
- lock acquisition and cleanup
- create versus patch resource behavior
- classification of build failures versus system failures
- host-capacity waiting around
VM_LIMIT_REACHED