22 Commits
Author SHA1 Message Date
Lars Wirzenius cb4cb5c2db refactor: avoid unnecessary borrow
Found by clippy in Rust 1.97.1.
2026-07-22 16:47:04 +03:00
Lars Wirzenius 4916f6b1c0 chore: update dependencies to current versions 2026-03-06 12:45:17 +02:00
Lars Wirzenius 03aac7817a chore: bump dependency on radicle-ci-broker to new release
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-02-03 08:48:04 +02:00
Lars Wirzenius 495ddf1518 refactor: use the message helper from radicle-ci-broker
Reduce code in the native CI adapter by using library code from the
Radicle CI broker.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-10 16:54:52 +02:00
Lars Wirzenius 27712152d9 feat: record adapter run ID in run log; add CSS to run log
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-12-09 08:27:45 +02:00
Lars Wirzenius c4bb071a95 feat! drop support for limiting the duration of a CI run
This adapter is only ever run by the Radicle CI broker, and that can
now limit CI run duration itself. Thus having this adapter do it too
is pointless duplication.

Further, this removes the run time dependency on an external "timeout"
command, which turns out not to be portable: it isn't available on
Macs, by default.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-12-09 07:35:54 +02:00
Lars Wirzenius 1488501bed feat: combine stdout and stderr into one stream
This makes it easier, for me, to follow the output. It's more like
what I see in the terminal if I run the commands directly. If this
turns out to be bad for others, I'll revert.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-26 16:18:48 +03:00
Lars Wirzenius ddb0603dcd fix: pass on request to run log, harder
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-05-14 18:02:53 +03:00
Lars Wirzenius 153c4fdcc5 fix: pass in request to run log
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-05-14 17:53:34 +03:00
Lars Wirzenius dd7496fa70 add timestamps for every commancd run
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-31 17:03:40 +03:00
Lars Wirzenius 89f0b970e3 feat: run "git show" to show the commit being built
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-31 16:40:28 +03:00
Lars Wirzenius 8c74e710b2 feat: turn of advice about detached head
Previously, every run log would contain:

    Note: switching to 'HEAD^'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by switching back to a branch.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:

      git switch -c <new-branch-name>

    Or undo this operation with:

      git switch -

    Turn off this advice by setting config variable advice.detachedHead to false

    HEAD is now at 2d0d98e feat: add branch or patch information to run log

This should now be gone.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-31 16:21:28 +03:00
Lars Wirzenius 332cf7eea7 feat: add repository name to run log
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-31 16:15:14 +03:00
Lars Wirzenius 830ddedc2d feat: add .radicle/native.yaml to run log
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-31 15:25:44 +03:00
Lars Wirzenius 8bd8b9b21b refactor: drop use of RunInfo
The run log replaces all uses of RunInfo now that the CI broker builds
report pages.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-31 15:08:03 +03:00
Lars Wirzenius 7746b37c33 chore: drop unused report module
The CI broker produces reports now.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-31 12:02:49 +03:00
Lars Wirzenius 76d5cc4a3a fix: return failure for command run by CI failing
If any command run by CI for a repository fails, set the run to failed
in the run info builder.

Also, we were hiding that failure with later errors, if, say, updating
a log file or removing temporary files failed, so don't do that.
2024-03-14 11:42:55 +02:00
Lars Wirzenius 3a7c8b668d fix: cope with heartwood's Id->RepoId rename
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-01-23 17:35:46 +02:00
Lars Wirzenius 294db7449d fix: set run log filename
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-01-16 19:53:34 +02:00
Lars Wirzenius decc8e979c fix: filename for run log
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-01-16 19:41:55 +02:00
Lars Wirzenius 211bb3a7d1 refactor: use engine in main
Also introduce exit codes: 0 for success, 1 for problem in the
repository under test, 2 for engine problem.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-01-16 19:20:27 +02:00
Lars Wirzenius 52ba6a9081 refactor: add new engine to execute a CI run
In the old engine it's hard to follow how various errors are handled.
This new engine should make it clearer.

This isn't entirely a pure refactoring. It subtly changed how the
external behavior is, to fix problems.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-01-16 19:19:50 +02:00