feat: output trigger event to stdout, file

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2025-03-04 18:43:57 +02:00
parent fe9ffca3d2
commit 43306e1513
4 changed files with 62 additions and 6 deletions
+27
View File
@@ -1789,6 +1789,33 @@ then stdout contains "main"
~~~
## Can output trigger message for a CI run
_Want:_ The `cibtool` command can output the CI event to trigger a CI
run to the standard output or a file.
_Why:_ This is helpful for debugging the CI broker at least.
_Who:_ `cib-devs`
~~~scenario
given a Radicle node, with CI configured with broker.yaml and adapter dummy.sh
given a Git repository xyzzy in the Radicle node
when I run ./env.sh cibtool --db x.db trigger --repo xyzzy --stdout
then stdout contains "rad:"
then stdout contains "main"
when I run ./env.sh cibtool --db x.db trigger --repo xyzzy --output trigger.json
then file trigger.json contains "rad:"
then file trigger.json contains "main"
when I run cibtool --db x.db event list
then stdout is empty
~~~
## Add information about triggered run to database
_Want:_ `cibtool` can add information about a triggered CI run.