diff --git a/doc/userguide.md b/doc/userguide.md index 4d750fbd..be038942 100644 --- a/doc/userguide.md +++ b/doc/userguide.md @@ -43,6 +43,61 @@ also the "native adapter", that runs a shell script locally on the host where the adapter runs. Each adapter may require a different configuration to suit the CI system it targets. +# Configuration + +The CI broker must be started with a configuration file. The `config` +sub-command tells `cib` to write out the actual run-time +configuration, as computed from the specified configuration file and +built-in defaults. + +~~~sh +cib --config /etc/radicle-ci-broker/config.yaml config +~~~ + +The output will be in JSON (which also works as YAML input): + +~~~json +{ + "default_adapter": "dummy", + "adapters": { + "dummy": { + "command": "../dummy.sh", + "env": {}, + "sensitive_env": {} + } + }, + "filters": [], + "triggers": null, + "report_dir": "html", + "status_update_interval_seconds": null, + "db": "x.db", + "max_run_time": { + "secs": 3600, + "nanos": 0 + }, + "queue_len_interval": { + "secs": 3600, + "nanos": 0 + } +} +~~~ + +The configuration fields are: + +| field | summary | +|:------|:--------| +| `adapters` | list of CI adapters | +| `db` | database | +| `default_adapter` | this will become deprecated, use `triggers` instead | +| `filters` | this will become deprecated, use `triggers` instead | +| `max_run_time` | maximum duration of a CI run | +| `queue_len_interval` | how often the event queue length should be logged | +| `report_dir` | directory where HTML and JSON report pages are written | +| `status_update_interval_seconds` | how often should `status.json` be updated? | +| `triggers` | see [the "Triggering CI" chapter](#triggers) | + + + # CI events The CI broker currently supports a small set of CI events. There will @@ -164,7 +219,7 @@ joined together using '!Or` -- in other words, if any of the expressions in the list allows the event, the whole list allows the events. -# Triggering CI +# Triggering CI {#triggers} The Radicle CI broker can be configured to trigger CI runs in two ways: diff --git a/doc/userguide.subplot b/doc/userguide.subplot index a6033cbf..173767b1 100644 --- a/doc/userguide.subplot +++ b/doc/userguide.subplot @@ -4,3 +4,5 @@ authors: - The Radicle Project markdowns: - userguide.md +classes: + - json