Skip to main content

Crate xtask

Crate xtask 

Source
Expand description

The nomisync CI pipeline, as a program.

Invoked from .forgejo/workflows/ci.yml as cargo run -p xtask -- <command>. Deliberately dependency-light: this is the first thing a CI job builds, and it starts the database the rest of the workspace compiles against, so it must not itself need one.

What stays outside: .forgejo/scripts/deploy.sh runs in a kaniko init container that has no Rust toolchain, and ci/builder/build.sh builds the container image this program runs inside.

Modulesยง

artifact ๐Ÿ”’
The artifact layout: object keys, per-kind provenance, and the manifest.
deploy_render ๐Ÿ”’
Guards .forgejo/scripts/deploy.shโ€™s Job rendering.
heartbeat ๐Ÿ”’
Keeps a jobโ€™s log stream alive across long silent phases.
postgres ๐Ÿ”’
A throwaway Postgres for the lifetime of one command.
publish ๐Ÿ”’
Publishing an artifact to object storage, and reading one back.
release ๐Ÿ”’
The artifact-producing phases.
watchdog ๐Ÿ”’
Runs a command that is expected to keep talking, and diagnoses it if it stops.

Structsยง

Cli ๐Ÿ”’

Enumsยง

Command ๐Ÿ”’

Functionsยง

finalize ๐Ÿ”’
The single writer of the manifest.
main ๐Ÿ”’
produce ๐Ÿ”’
with_artifacts ๐Ÿ”’
True only where the workflow decided this run may hold the artifacts key โ€” master. A PR run builds and verifies everything with no credential mounted.
with_postgres ๐Ÿ”’
Starts Postgres, exports DATABASE_URL, and runs the given command.