doc(doc/userguide.md): add a chapter on configuration

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2025-03-13 18:03:06 +02:00
parent 4f98127322
commit b0adc805ec
2 changed files with 58 additions and 1 deletions
+56 -1
View File
@@ -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:
+2
View File
@@ -4,3 +4,5 @@ authors:
- The Radicle Project
markdowns:
- userguide.md
classes:
- json