154 Commits
Author SHA1 Message Date
Lars Wirzenius 1921aed19d tests: drop 0.23.0 from upgrade tests 2025-12-09 16:42:17 +02:00
Lars Wirzenius e36b10a4cb tests: add release 0.24.0 to upgrade tests 2025-12-09 16:37:52 +02:00
Lars Wirzenius 99fc34b747 tests: drop version 0.22.0 from upgrade tests 2025-11-25 11:01:38 +02:00
Lars Wirzenius ef0a8aa1c3 tests: add version 0.23.0 to upgrade tests 2025-11-25 10:57:57 +02:00
Lars Wirzenius 97762c6dde tests: drop 0.21.0 from upgrade tests 2025-11-13 17:27:10 +02:00
Lars Wirzenius 20f36b07d0 tests: add v0.22.0 to upgrade tests 2025-11-13 17:24:24 +02:00
Lars Wirzenius 94fbd9f72f feat: add the AnyDelegate filter 2025-11-10 17:13:15 +02:00
Lars Wirzenius e8217e8c80 test(ci-broker.md): change shutdown scenario to verify cleanliness 2025-10-20 09:25:44 +03:00
Lars Wirzenius b9a8f9d586 tests: drop old releases, to speed up upgrade test 2025-10-16 18:15:45 +03:00
Lars Wirzenius 0c1d5ac76d tests: add missing releasex to upgrade tests 2025-10-16 18:12:56 +03:00
Lars Wirzenius 7ba599bbe2 tests(ci-broker.md): add scenario for empty queue 2025-10-14 16:10:45 +03:00
Lars Wirzenius 4f8865b771 fix(ci-broker.md): drop unused embedded file 2025-09-24 08:09:03 +03:00
Lars Wirzenius acd3dd068e test: add scenario that uses all event filters in config file
This makes it more obvious if we miss support for a filter.
2025-09-24 07:48:07 +03:00
Lars Wirzenius a2dec1a5b3 add all filters to config file so we verify they can be parsed 2025-09-24 07:27:02 +03:00
Lars Wirzenius 6f29315b46 tests(ci-broker.md): add scenario for JSON config file
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-19 08:10:37 +03:00
Lars Wirzenius 80db71a440 feat: cibtool trigger --patch option
Either `--commit` or `--patch` is now mandatory, undoing the
simplification in recent commits.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 14:10:46 +03:00
Lars Wirzenius a13b5a9868 feat: cibtool event add defaults to HEAD commit of chosen ref
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 10:31:42 +03:00
Lars Wirzenius 562465ef93 feat: cibtool event add defaults to default branch
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 10:22:15 +03:00
Lars Wirzenius b84fffaf02 feat! make cibtool log read cib log output as well
Previously we only supported reading `cib` log output wrapped into
`journald` messages as JSON.

This is a breaking change because the command line syntax changes
slightly.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 09:40:40 +03:00
Lars Wirzenius 6736324dd7 test: drop 0.18.0 from upgrade tests, add 0.19.1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-06 16:27:06 +03:00
Lars Wirzenius 5439018503 tests: add scenario to verify behavior when adapter fails
Verify behavior for both a successful and a failed CI run, but with an
adapter that returns non-zero.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-05 08:01:31 +03:00
Lars Wirzenius 1f85b1b9e0 test: test upgrade to v0.19.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-07-28 08:47:45 +03:00
Lars Wirzenius 073b652f7c fix: serialize only the adapter config, not the adapter spec
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-06-12 16:59:41 +03:00
Lars Wirzenius d1db5e96ac feat: allow configuring adapters in the cib configuration file
This makes it easier to specify several adapters, with varying
configurations, by not having to put the configuration for each
specification in a separate file.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-06-12 14:44:39 +03:00
Lars Wirzenius f32efd9166 test: add release 0.18.0 to upgrade tests
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-06-09 08:01:03 +03:00
Lars Wirzenius 7f8ddca5a3 test: make upgrade tests pass despite warnings
For a reason I do not entirely understand, the upgrade test started
failing when I removed `rust-toolchain` from the **current** git, even
though old releases still have it. The failures are due to warnings.
Work around this by removing the `#![deny(...)]` and `#[deny(...)]`
lines from the source of the old releases.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-06-03 09:23:20 +03:00
Lars Wirzenius 43f2de4605 test: drop release 0.12 from upgrade tests
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-06-03 08:49:12 +03:00
Lars Wirzenius b93695ff43 fix: parse "concurrent_adapters" in config correctly
Oops. Brown paper bag moment.

This undoes the type mangling to ensure the field value is never zero,
in favor of doing run time logic. That should be done with types some
day, but today I need to get running.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-05-19 16:51:51 +03:00
Lars Wirzenius af581de269 test(ci-broker.md): add previous release to upgrade tests
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-05-19 10:36:35 +03:00
Lars Wirzenius 8d7989cc6a Revert "fix: "cibtool run list" shows ids without loading run info"
This reverts commit 900a457157.
2025-04-17 17:04:46 +03:00
Lars Wirzenius 765e6b606c fix: "cibtool run remove" removed only by broker run id by default
We need to parse the run info in the database as JSON to get at the
adapter run info. This fails if the run info can't be parsed. That can
happen if the database has run info from a development version. Change
`cibtool run remove` so that it takes only broker run ids by default
so that we can delete using those even if the run info is broken.
Allow removing by adapter run id with the `--adapter` option.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-04-07 15:35:47 +03:00
Lars Wirzenius 900a457157 fix: "cibtool run list" shows ids without loading run info
If the run info can't be parsed as JSON, loading it will fail. Change
`cibtool run list` so that it only lists the run ids by default.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-04-07 15:34:57 +03:00
Lars Wirzenius 756d7ac81d fix: Subplot step to run git in sub directory
Subplot's Rust lib/runcmd library currently sets HOME to the directory
in which a command is run. If the step is "when I run, in foo, git",
then git is run with HOME set to point to the sub-directory foo under
the per-scenario data directory. I suspect this is a bug in Subplot,
but until that is confirmed and fixed by Subplot, and the fix included
in a release, we can avoid that by running "env -C foo git" instead.
This has the effect of changing the working directory to foo before
running git, without affecting any environment variables, which is
what we want.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-04-04 15:00:38 +03:00
Lars Wirzenius a7d02c18c4 feat: make Tag event filter take a regular expression
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-04-04 11:42:11 +03:00
Lars Wirzenius b783ef65d7 feat: events for created, updated, deleted Git tags
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-04-04 10:59:07 +03:00
Lars Wirzenius 7cab201b41 feat: version number now includes Git commit short id
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-03-31 15:04:06 +03:00
Lars Wirzenius 29c37f9095 test(ci-broker.md): add scenario to run cib without a report dir
We want to make sure this works.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-03-24 18:05:06 +02:00
Lars Wirzenius 0d1d3291cc fix: use new Git refs module, fix bugs found
This is a huge change, but it's mostly a few kinds of similar changes
in a lot of places. Unfortunately, they were not easy to tease apart
into small, easily reviewed commits.

Use the Git ref types created by the new refs module. Fix problems
this exposes.

The CiEvent enum variants for branch events now use the BranchName
type for branch names. In other words, they have a plain branch name.
The CiEvent::from_node_event constructor also always sets the branch
name to a plain branch name, instead of a name spaced ref for updated
or deleted branches. The ci_event.rs module's unit tests have been
fixed to use the correct kind of Git ref in each test. (It used to be
a mess.)

The CI event filter "Branch" now contains a BranchName, previously a
RefString. This should not break anything, as a RefString will always
work as a BranchName.

The DefaultBranch filter now works, because it compares plain branch
names, where it previously would compare a plain and a name spaced
branch name, and those are never equal.

"cibtool trigger" and "cibtool event add" now add branch events with a plain
branch instead of a name spaced ref.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-03-20 18:33:39 +02:00
Lars Wirzenius 43306e1513 feat: output trigger event to stdout, file
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-03-04 18:43:57 +02:00
Lars Wirzenius fe9ffca3d2 feat: cibool run remove
Also fix Db::remove_run, which has never actually worked, because the
run id column was named wrongly. Oops.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-03-04 17:43:05 +02:00
Lars Wirzenius e69262d186 feat: add metadata about CI run to RSS feed entries
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-02-19 17:26:39 +02:00
Lars Wirzenius 2778011d40 trigger
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-02-17 14:45:41 +02:00
Lars Wirzenius 5a9fdb2a79 test: drop old release from upgrade tests
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-02-05 14:48:18 +02:00
Lars Wirzenius 623e590c2c feat: HasFile event filter predicte
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-02-04 18:46:19 +02:00
Lars Wirzenius 2ef02467f8 feat: add predicate DefaultBranch
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-02-04 16:59:22 +02:00
Lars Wirzenius 14ad23cc83 feat: refuse configuration files with unknown fields
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-02-04 14:45:05 +02:00
Lars Wirzenius 9e84afecbf feat! change the "Not" event filter to take a list of filters
Change the logical negation operator `Not` to take a list of filters
as operands. The operator returns true, if and only if all of the
operands are false. The syntax is now consistent with logical `And`
and `Or`, which simplifies code, and is expected to simplify use.

In YAML syntax, `Not` now works like this:

~~~
!Not
  - !Allow
~~~

Previously, `!Not` only had one operand, so that above would have been
expressed as `!Not Allow`.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-30 15:36:57 +02:00
Lars Wirzenius d0c6a8c8c1 test(ci-broker.md): verify event filter Not
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-29 18:00:01 +02:00
Lars Wirzenius d97f1c6720 test(ci-broker.md): verify event filter Or
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-29 18:00:01 +02:00
Lars Wirzenius 42bded3825 test(ci-broker.md): verify event filter And
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-29 18:00:01 +02:00