Build and Test

Most binaries and packages are “pure” Go and can be directly go-installed and go-tested:

$ export GO111MODULE=on

$ go install
$ go install
$ go test
$ go test

Certain packages used by consumer applications, like, require CGO to build and also require appropriate development libraries for RocksDB. Standard Linux packages are insufficient, as run-time type information must be enabled in the RocksDB build (and it’s turned off in the standard Debian package, for example).

Continuous Integration

Gazette uses a Make-based build system which pulls down and stages development dependencies into a .build sub-directory of the repository root:

$ make go-install
$ make go-test-fast

Continuous integration builds of Gazette run tests 15 times, with race detection enabled:

$ make go-test-ci

The Make build system offers fully hermetic builds using a Docker-in-Docker builder. Run CI tests in a hermetic build environment:

$ make as-ci target=go-test-ci

Package release Docker images for the Gazette broker and examples, as gazette-broker:latest and gazette-examples:latest.

$ make as-ci target=ci-release-gazette-broker
$ make as-ci target=ci-release-gazette-examples

Deploy Gazette’s continuous soak test to a Kubernetes cluster (which can be Docker for Desktop or Minikube). Soak tests run with latest images.

$ kubectl apply -k ./kustomize/test/deploy-stream-sum-with-crash-tests/

Push images to a registry. If registry is not specified, it defaults to localhost:32000 (which is used by MicroK8s):

$ make push-to-registry

The kustomize directory also has a helper manifest for using a local registry (eg, for development builds).