Files
wfe/wfectl/Cargo.toml

55 lines
1.7 KiB
TOML
Raw Normal View History

feat(wfectl): new CLI client + wfe-ci builder image wfectl is a command-line client for wfe-server with 17 subcommands covering the full workflow lifecycle: * Auth: login (OAuth2 PKCE via Ory Hydra), logout, whoami * Definitions: register (YAML → gRPC), validate (local compile), definitions list * Instances: run, get, list, cancel, suspend, resume * Events: publish * Streaming: watch (lifecycle), logs, search-logs (full-text) Key design points: * `validate` compiles YAML locally via `wfe-yaml::load_workflow_from_str` with the full executor feature set enabled — instant feedback, no server round-trip, no auth required. Uses the same compile path as the server's `register` RPC so what passes validation is guaranteed to register. * Lookup commands accept either UUID or human name; the server resolves the identifier for us. Display tables show both columns. * `run --name <N>` lets users override the auto-generated `{def_id}-{N}` instance name when they want a sticky reference. * Table and JSON output formats, shared bearer-token or cached-login auth path, direct token injection via `WFECTL_TOKEN`. * 5 new unit tests for the validate command cover happy path, unknown step type rejection, and missing file handling. Dockerfile.ci ships the prebuilt image used as the `image:` for kubernetes CI steps: rust stable, cargo-nextest, cargo-llvm-cov, sccache (configured via WFE_SCCACHE_* env), buildctl for in-cluster buildkitd, kubectl, tea for Gitea releases, and git. Published to `src.sunbeam.pt/studio/wfe-ci:latest`.
2026-04-07 19:09:26 +01:00
[package]
name = "wfectl"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Command-line client for wfe-server"
[[bin]]
name = "wfectl"
path = "src/main.rs"
[dependencies]
# `wfectl validate` compiles YAML locally so users get instant feedback
# without a server round-trip. Enable the full executor feature set so every
# step type the server supports is also recognized by the CLI.
wfe-yaml = { workspace = true, features = ["rustlang", "buildkit", "containerd", "kubernetes", "deno"] }
wfe-server-protos = { workspace = true }
tonic = { version = "0.14", features = ["tls-native-roots"] }
tokio = { workspace = true }
tokio-stream = { workspace = true }
clap = { version = "4", features = ["derive", "env"] }
serde = { workspace = true }
serde_json = { workspace = true }
serde_yaml = { workspace = true }
toml = "0.8"
reqwest = { workspace = true, features = ["rustls-tls"] }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
chrono = { workspace = true }
dirs = "5"
sha2 = "0.10"
base64 = "0.22"
rand = "0.8"
url = { workspace = true }
prost-types = "0.14"
prost = "0.14"
comfy-table = "7"
indicatif = "0.17"
hyper = { version = "1", features = ["server", "http1"] }
hyper-util = { version = "0.1", features = ["tokio"] }
http-body-util = "0.1"
anyhow = "1"
thiserror = { workspace = true }
futures = { workspace = true }
[dev-dependencies]
pretty_assertions = { workspace = true }
tokio = { workspace = true, features = ["test-util"] }
tempfile = { workspace = true }
wiremock = { workspace = true }
wfe-core = { workspace = true, features = ["test-support"] }
wfe = { path = "../wfe" }