The relay pipelines are rendered as a pipedream.
You'll need the following dependencies to build the pipelines:
brew install go-jsonnet jsonnet-bundler yqYou can render the jsonnet pipelines by running:
make gocdThis will clean, fmt, lint and generate the GoCD pipelines to ./gocd/generated-pipelines.
The Relay pipelines are using the https://github.com/getsentry/gocd-jsonnet libraries to generate the pipeline for each region.
Below is a description of the directories in the gocd/ directory.
These are a set of jsonnet and libsonnet files which are used to generate the relay pipelines. This avoids duplication across our GoCD pipeline files as we deploy to multiple regions.
The gocd/templates/processing.jsonnet and gocd/templates/pops.jsonnet files are the entry points for the relay pipelines.
gocd/templates/libs/*.libsonnet define the pipeline behaviors for deploy relay and relay-pops. These libraries are used to create a GoCD pipeline, following the same naming as the GoCD yaml pipelines.
gocd/templates/bash/*.sh are shell scripts that are inlined in the result pipelines. This seperation means syntax highlighting and extra tooling works for relay's bash scripts.
gocd/templates/jsonnetfile.json and gocd/templates/jsonnetfile.lock.json are used by jsonnet-bundler, a package manager for jsonnet.
You can update jsonnet dependencies by runnning jb update.
The jsonnet files are read directly, so the generated pipelines are not commited to the repo.