doc: add a more realistic configuration example to user guide

This commit is contained in:
Lars Wirzenius
2026-08-24 15:24:42 +03:00
parent 9b8e1fea13
commit ade641d76d
+73 -2
View File
@@ -92,7 +92,6 @@ adapters:
command: /bin/radicle-native-ci
env:
RADICLE_NATIVE_CI: /home/_rad/native-ci.yaml
PATH: /bin:/home/_rad/.radicle/bin:/home/_rad/.cargo/bin
sensitive_env: {}
triggers:
- adapter: native
@@ -472,7 +471,7 @@ Otherwise it is discarded and does not trigger a CI run.
| `Patch` | Event refers to a specific patch, identified by ID |
| `Repository` | Event refers to a specific repository, identified by ID |
## Example
## Simple example
The following example is a snippet of YAML for the CI broker
configuration file to match events that refer to the` main` in the CI
@@ -495,6 +494,78 @@ joined together using '!Or` -- in other words, if any of the
expressions in the list allows the event, the whole list allows the
events.
## Complicated example
The following is the actual `cib` configuration on `ci0`, one of the author's
production CI nodes. It shows how to embed adapter configuration in the `cib`
configuration. Further, the Ambient CI configuration is extended in that.
The adapter configuratio sets `PATH` so that it includes
`/home/ci/.cargo/bin`, because the way that server is set up it doesn't
inherit that in its environment, when `cib` is run as a service via `systemd`.
~~~yaml
description: |
<p>This is a Radicle CI node at <b>ci0</b>.
max_run_time: "60min"
db: /home/ci/ci.db
report_dir: /srv/http
concurrent_adapters: 5
update_job_cobs: false
adapters:
ambient:
command: /bin/radicle-ci-ambient
env:
PATH: /home/ci/.cargo/bin:/bin:/usr/local/bin
RADICLE_CI_AMBIENT: /home/ci/radicle-ci-ambient.yaml
config_env: RADICLE_CI_AMBIENT
config:
image: /home/ci/ambient.qcow2
logdir: /srv/http/ambient-log
log: /home/ci/adapter-logs
base_url: "http://ci0/ambient-log"
trust_repository_name: true
allow_post_plan: true
extra_ambient_config_values:
rsync_target_base: "ci@http.liw.fi:/srv/http"
rsync_target_map:
ambient-ci: doc.liw.fi/ambient-ci
cachedir: doc.liw.fi/cachedir
clab: doc.liw.fi/clab
ewww: doc.liw.fi/ewww
jt: doc.liw.fi/jt
obnam: doc.obnam.org/obnam
obnam.org: obnam.org
puomi: doc.liw.fi/puomi
rad-ci: rad-ci.liw.fi
radicle-ci-ambient: radicle-ci-ambient.liw.fi
radicle-ci-broker: radicle-ci-broker.liw.fi
radicle-ci-homepage: radicle-ci.liw.fi
riki: doc.liw.fi/riki
sopass: doc.liw.fi/sopass
sshca: doc.liw.fi/sshca
subplot: doc.subplot.tech
subplot-web: subplot.tech
summain: doc.liw.fi/summain
v-i: doc.liw.fi/v-i
vmadm: doc.liw.fi/vmadm
vmdb2: vmdb2-manual.liw.fi
dput_target: apt.liw.fi
secrets:
- source: /home/ci/.ssh/id_rsa
dest: ssh_key
- source: /home/ci/.ssh/id_rsa-cert.pub
dest: ssh_key-cert.pub
- source: /etc/dput.cf
dest: dput.cf
triggers:
- adapter: ambient
filters:
- !And
- !HasFile ".radicle/ambient.yaml"
- !DefaultBranch
~~~
# Triggering CI {#triggers}
The Radicle CI broker can be configured to trigger CI runs in two