Skip to content

Contributing

Development setup

git clone https://github.com/christopherime/droidfarm.git
cd droidfarm

Operator

cd operator
go mod download
go test ./...
go vet ./...

Dashboard

cd dashboard
go mod download
go vet ./...

CLI

cd cli
go mod tidy
go build -o ../bin/droidfarm .

Local docs server

make docs-install   # pip install mkdocs-material mkdocs-minify-plugin
make docs           # serves at http://localhost:8001

Or with Docker:

docker compose up docs

Running lint checks

make lint

This runs helm lint, go vet on all modules, and shellcheck on all shell scripts.

Running tests

make test

Commit style

<type>: <short description>

type: feat | fix | refactor | docs | test | ci | chore

Examples:

feat: add idleTimeout to DevicePoolReconciler
fix: correct ADB permission grant for Android 14
docs: update node-requirements with Azure NVv4 info
ci: add arm64 build to build-cli workflow

Pull request checklist

  • [ ] make lint passes
  • [ ] make test passes
  • [ ] New CRD fields have validation markers
  • [ ] docs/ updated if behaviour changed
  • [ ] Commit messages follow the style above

Architecture decisions

Significant architectural decisions are documented in docs/adr/. Add a new ADR when a design choice has meaningful trade-offs worth capturing.

ADR format:

# NNN — Title

## Status
Proposed | Accepted | Deprecated

## Context
Why does this decision need to be made?

## Decision
What was decided?

## Consequences
What are the trade-offs?

Release process

Releases are tag-driven:

git tag v0.2.0
git push origin v0.2.0

This triggers:

  1. build-operator.yaml — builds and pushes operator image
  2. build-dashboard.yaml — builds and pushes dashboard image
  3. build-cuttlefish.yaml — builds Cuttlefish images for Android 13/14/15
  4. build-init.yaml — builds init container image
  5. build-cli.yaml — builds CLI binaries for all platforms
  6. release.yaml — creates GitHub Release, attaches Helm chart + CLI binaries
  7. pages.yaml — rebuilds docs site and updates Helm chart index

Adding a new CRD field

  1. Edit the type in operator/api/v1alpha1/<type>_types.go
  2. Add validation markers (// +kubebuilder:validation:...)
  3. Run cd operator && make generate manifests
  4. Update manifests/crds/<type>.yaml from the generated output
  5. Update docs/crd-reference.md
  6. Add an example to manifests/examples/