Lars Wirzenius
d86d3a64d7
build: configure git for tests
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-01-13 10:46:41 +02:00
Lars Wirzenius
8312c47083
build: add .radicle/ambient.yaml
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-01-13 10:32:46 +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
3ebc354ed6
chore: bump dependency on radicle-ci-broker to current release
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-01-10 16:51:00 +02:00
Lars Wirzenius
a883ed775f
chore: bump MSRV to match heartwood
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-01-08 14:58:52 +02:00
Lars Wirzenius
847a9f4aa5
fix(NEWS.md): CI _broker_ has timeout
...
Thank-you-to: Richard Levitte
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-01-07 17:51:03 +02:00
Lars Wirzenius
ac827931a6
chore: prepare release 0.6.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-01-07 14:46:18 +02:00
Lars Wirzenius
d2ab2f7050
chore: bump dependencies on radicle, radicle-ci-broker
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-01-03 16:09:43 +02:00
Lars Wirzenius
215dbf3d6b
feat: log start time and duration in run log
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-12-09 10:34:22 +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
5f021167e8
feat: add command line parsing to rad-ci, with --dry-run option
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-12-09 07:24:12 +02:00
Lars Wirzenius
75ba2146a2
chore: prepare release 0.5.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-12-05 13:28:52 +02:00
Lars Wirzenius
f3d4e4a99b
feat: add a time stamp to each log message
...
Thank-you: Richard Levitte
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-12-05 13:02:06 +02:00
Lars Wirzenius
d1151856d5
chore: drop unused AdminLog methods
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-12-05 09:29:18 +02:00
Lars Wirzenius
d677911da6
chore: prepare release 0.4.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-22 09:25:40 +02:00
Lars Wirzenius
c95e4179c4
doc: update README.md for the _previous_ release
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-22 09:22:42 +02:00
Lars Wirzenius
70535d85f0
doc: add rad-ci to README
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-22 09:05:12 +02:00
Lars Wirzenius
7dde548745
add rad-ci binary
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-20 18:12:05 +02:00
Lars Wirzenius
6b0b32bb75
chore: bump crate version for upcoming release
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-14 07:24:07 +02:00
Lars Wirzenius
3366fc9074
refactor: make code to create the preamble clearer
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-11 12:17:23 +02:00
Lars Wirzenius
5f7eba89cf
feat: move ToC to top, add all headings
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-11 12:11:32 +02:00
Lars Wirzenius
423d4aeea9
chore: bump dependency on thiserror to current release
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-08 15:01:50 +02:00
Lars Wirzenius
d1a7ae68e1
chore: bump dependency on radicle-ci-broker to its recent release
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-08 15:00:56 +02:00
Lars Wirzenius
6beae38618
chore: update html-page dependency to 0.4.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-08 14:14:01 +02:00
Lars Wirzenius
b7910c80a8
chore: update dependencies to current versions
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-11-07 15:40:19 +02:00
Lars Wirzenius
82d54a0248
chore: update Cargo.lock; drop spurious date.txt
2024-11-07 15:19:17 +02:00
Lars Wirzenius
db400ba595
fix: set PATH to include CI user's home directory's .radicle/bin
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-26 16:34:42 +03: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
d4141ef671
chore: cargo update
2024-06-10 16:47:37 +03:00
Lars Wirzenius
7947dd6571
feat: return URL to build log if base URL is configured
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-06-10 16:22:58 +03:00
Lars Wirzenius
7f6aff9795
feat: allow an optional base URL in the configuration file
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-06-10 15:32:20 +03:00
Lars Wirzenius
63fb66f468
feat: add --show-config to write out configuration as JSON
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-06-10 15:22:27 +03:00
Lars Wirzenius
17acd1c703
feat: add --version option
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-06-10 15:12:03 +03:00
Lars Wirzenius
0f668cb213
fix: use --locked with cargo install in debian/rules
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-06-06 18:42:14 +03:00
Lars Wirzenius
eb84bb5749
fix: cargo update
2024-06-06 18:40:48 +03:00
Lars Wirzenius
e7efad9573
chore: prepare release 0.2.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-06-06 18:36:59 +03:00
Lars Wirzenius
7b0a234ee5
chore: update dependencies on CI broker and radicle
...
Depend on ci broker 0.2.0 and radicle 0.11.0. Make a small required
change.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-06-06 18:30:45 +03:00
Lars Wirzenius
c462567153
feat: log repo and commit to admin log
...
They're in the build log too, and come from the trigger message, but
it's helpful for debugging to log them clearly.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-06-06 15:52:04 +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
7e4a761035
feat: log request message to run log
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-05-14 17:43:26 +03:00
Lars Wirzenius
125323ab36
tests: add TEMPORARY workaround for incompatible heartwood change
...
This needs to be removed once the native CI adapter can depend on a
newer heartwood, but for now, this allows tests to pass.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-05-14 17:21:10 +03:00
Lars Wirzenius
cae775ca67
docs(README.md): note env vars, logging
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-04-15 19:30:22 +03:00
Lars Wirzenius
8d90bd1459
docs: README clarification
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-04-15 19:00:46 +03:00
Lars Wirzenius
4758a54874
docs: note .radicle/native.yaml in README
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-04-15 19:00:46 +03:00
Lars Wirzenius
35fb7801a3
docs: format README a little
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-04-15 19:00:46 +03:00
Lars Wirzenius
ffa4142822
debug: log environment variable before running cargo run
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-04-15 18:38:17 +03:00
Lars Wirzenius
0d455cfba8
trigger
2024-04-15 18:00:16 +03:00
Lars Wirzenius
3bdfd1b4c6
trigger
2024-04-15 17:50:14 +03:00
Lars Wirzenius
41c3f6df11
trigger
2024-04-15 17:45:45 +03:00
Lars Wirzenius
ee90b919ae
chore: update html-page dependency to version 0.2.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-04-11 09:45:57 +03:00
Lars Wirzenius
c14b211702
chore: add useful fields to Cargo.toml
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-04-03 16:27:08 +03:00
Lars Wirzenius
eaeb89b3bf
feat: depend on radicle-ci-broker via crates.io, plus fixes
...
The CI broker has dropped the RunResult::Error variant, so drop any
use of that. The Request::version field has been added, so deal with
that.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-04-03 16:18:00 +03:00
Lars Wirzenius
8fd5e71c4b
fix: display native.yaml as a PRE
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-31 18:56:12 +03:00
Lars Wirzenius
3a153876f0
chore: bump Rust version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-31 17:22:31 +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
2d0d98ea2f
feat: add branch or patch information to run log
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-31 16:02:39 +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
15884006b2
add runspec to RunLog
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-31 15:14:41 +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
2fa62ab846
feat: add a table of contents to the run log
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-31 14:51:56 +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
b38a6c4767
docs: update README and add licenses
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-31 11:36:41 +03:00
Lars Wirzenius
26396fa7d3
tests: replace Python test-suite script with Rust integration test
2024-03-14 11:42:55 +02:00
Lars Wirzenius
b98bd3cc15
chore: drop unused NativeMessageError::RemoveDir variant
2024-03-14 11:42:55 +02: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
6e2d748267
feat: make Config and RunSpec serializable
...
We'll soon be adding tests that write these to files, and that needs
them to be serializable.
2024-03-14 11:42:24 +02:00
Lars Wirzenius
34c94f15aa
chore: update dependencies
...
Add serde_json, which we're about to need for tests. Update Cargo.lock
by adding "cargo update".
2024-03-14 11:24:32 +02:00
Lars Wirzenius
7515cb92a1
tests: add native CI to itself
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-05 18:54:04 +02:00
Lars Wirzenius
961ba3013c
chore: update Cargo.lock
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-05 12:23:41 +02:00
Lars Wirzenius
f3a3c61b57
feat! don't write a report to index.html
...
CI broker will be writing it in the future.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-03-04 16:55:21 +02:00
Lars Wirzenius
b7d0f037f3
fix: send "triggered" message immediately
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-02-16 11:25:30 +02:00
Lars Wirzenius
71e0c9482b
chore: build deb without dh-cargo
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-02-12 11:51:34 +02:00
Lars Wirzenius
f182bf21c9
fix: change radicle-ci-broker to use a git dependency
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-02-12 11:14:51 +02:00
Lars Wirzenius
9b60a81037
cargo update
2024-02-09 21:06:08 +02:00
Lars Wirzenius
4f2f8c86cf
initial debian packaging
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-02-09 20:04:21 +02:00
Lars Wirzenius
16878c0294
fix: set rust-version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-02-08 17:25:22 +02:00
Lars Wirzenius
1bb93c51b2
adapt to new trigger message structure in broker
2024-02-02 15:58: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
49f6711e22
feat: put last-updated time stamp to top
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-22 10:08:14 +02:00
Lars Wirzenius
a41e347952
fix: don't reverse
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-22 10:06:57 +02:00
Lars Wirzenius
1c1ae27e36
fix: use sorted runs
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-22 10:05:57 +02:00
Lars Wirzenius
370f70fb24
fix: reverse order of runs
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-22 09:49:52 +02:00
Lars Wirzenius
c4d4fe11e1
feat: order runs newest first
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-22 09:42:44 +02:00
Lars Wirzenius
0354e5a0e7
fix: set run id in run info
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-16 19:56:22 +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
00b96b88cd
fix: where run info is stored
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-16 19:36: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
Lars Wirzenius
e786def6cd
refactor: rename log or logfile to adminlog, for clarity
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-15 18:09:16 +02:00
Lars Wirzenius
3a56190257
refactor: rename LogFile to AdminLog
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-15 18:00:52 +02:00
Lars Wirzenius
7cab669cca
improve error handling
...
Incl. fix tests.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-15 17:37:49 +02:00
Lars Wirzenius
bd74aeeccc
feat: show absolute path name for runcmd "in directory"
...
This is more helpful than ".".
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-15 14:41:27 +02:00
Lars Wirzenius
c949db7e6f
fix: write the run log
...
It turns out that writing the to a file is sometimes a useful thing to
do. Who could've foreseen this. Well, they're using a paper bag on
their head as they're writing this commit message.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-15 14:41:27 +02:00
Lars Wirzenius
3a20cb66e6
feat! drop the env logging
...
We have a run log, aimed at the developer for whose project CI is run,
and the node admin log, aimed at the node admin. We don't need a third
log aimed at the developer of the native CI engine itself.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-15 14:38:58 +02:00