Crates.io | radicle-ci-ambient |
lib.rs | radicle-ci-ambient |
version | 0.10.1 |
source | src |
created_at | 2025-01-10 14:46:27.230305+00 |
updated_at | 2025-06-05 09:53:29.197026+00 |
description | A Radicle CI adapter for the Ambient CI enbine |
homepage | https://radicle.xyz |
repository | https://app.radicle.xyz/nodes/radicle.liw.fi/rad:z35CgFVYCKpqqDtJMzk8dyE6dViS6 |
max_upload_size | |
id | 1511314 |
size | 158,195 |
radicle-ci-ambient
-- a Radicle CI adapter for Ambient CIIntegrate the Ambient CI software with the Radicle CI broker.
Given a Radicle node with the CI broker:
ambient
on the host. This will
require qemu-system-x86_64
and a virtual machine image./bin/radicle-ci-ambient
but the location doesn't matter, as long
as you specify it correctly in the configuration.default_adapter: ambient
adapters:
ambient:
command: /bin/radicle-ci-ambient
env:
RADICLE_CI_AMBIENT: /home/_rad/radicle-ci-ambient.yaml
RADICLE_CI_BROKER_WEBROOT: /srv/pages/ci-broker
PATH: /bin:/home/_rad/.radicle/bin:/home/_rad/.cargo/bin
PATH
as necessary.radicle/ambient.yaml
This is also known as a distilled plan. It is YAML, with three fields:
pre_plan
plan
post_plan
Each field is a list of Ambient actions. The pre- and post-plan actions are run locally on the host, and have network access, but they're restricted to a small set of variants that are deemed safe and secure, what Ambient calls trusted actions:
cargo_fetch
rsync
dput
The actions in the plan
are less constrained, but they run in a
virtual machine without network access.
mkdir
shell
cargo-fmt
cargo-clippy
cargo-build
cargo-test
cargo-install
deb
(These need to be documented in Ambient.)
Example:
pre_plan:
- action: cargo_fetch
plan:
- action: cargo_fmt
- action: cargo_clippy
- action: shell
shell: |
export DEBEMAIL=liw@liw.fi
export DEBFULLNAME="Lars Wirzenius"
export CARGO_TARGET_DIR=/workspace/cache
# git reset --hard
# git clean -fdx
# git switch main
git status --ignored
# git clean -fdx
V="$(dpkg-parsechangelog -SVersion | sed 's/-[^-]*$//')"
T="$(date -u "+%Y%m%dT%H%M%S")"
version="$V.ci$T-1"
dch -v "$version" "CI build under Ambient."
dch -r ''
- action: deb