Files
marqdo-knowledge/.woodpecker/main.yml
T
marqdo-knowledge 835f61dc01 ci: align release tooling with the upstream deterministic pipeline
- add tools/release/package.py: sorted, commit-timestamped, uid/gid-normalised
  deterministic archive; refuses dirty trees, source-SHA mismatch and stale
  versions; emits SOURCE_SHA, FILES.sha256 and RELEASE_INFO.json with binaries,
  protocol revisions, core baseline and manifest digest
- add tools/release/smoke.py: verifies checksum/manifest/source/version then
  cold-installs the archive through a real core CLI into an isolated
  MARQDO_TOOL_HOME and exercises help/compile/query/check/remove, writing smoke
  evidence
- add tools/ci/test_release_metadata.py: single CI gate for version/fact
  consistency across Cargo files, tool.json, spec, CHANGELOG, release notes,
  README and CI configuration
- Woodpecker and GitHub pipelines now run the metadata gate and use the Python
  packager/smoke test in the tag-only release lane; shell release scripts are
  thin wrappers; docs/ci.md and docs/releasing.md document gates and non-gates
2026-11-26 09:05:27 +08:00

67 lines
2.7 KiB
YAML

# Woodpecker CI pipeline for marqdo-knowledge.
#
# Mirrors the local lanes in scripts/ci.sh and the GitHub workflow. The core CLI
# is built from the pinned marqdo-cli commit because the Analysis contract is an
# external boundary; integration tests always run against that real binary.
when:
event: [push, pull_request, tag]
steps:
test:
image: rust:1.100-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates python3
- rustup component add clippy rustfmt
- python3 tools/ci/test_release_metadata.py
- cargo fmt --all -- --check
- cargo clippy --workspace --all-targets --locked -- -D warnings
- cargo test --workspace --locked
minimum-rust:
image: rust:1.89-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates build-essential
- cargo check --locked --workspace --all-targets
core-analysis:
image: rust:1.100-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates git build-essential
- |
set -eu
core_sha=4bbefc92449ee480c8a2c89b0308feb4cda8d0e7
work=$(mktemp -d)
git clone --quiet https://github.com/cflmy/marqdo-cli "$work/core"
( cd "$work/core" && git checkout --quiet "$core_sha" \
&& cargo build --release --locked -p marqdo-cli )
MARQDO_TEST_BIN="$work/core/target/release/marqdo" \
cargo test --workspace --locked
- cargo build --locked
- target/debug/marqdo-knowledge --help >/dev/null
release:
depends_on: [test, minimum-rust, core-analysis]
when:
event: [tag]
image: rust:1.100-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates git build-essential python3
- |
set -eu
core_sha=4bbefc92449ee480c8a2c89b0308feb4cda8d0e7
work=$(mktemp -d)
git clone --quiet https://github.com/cflmy/marqdo-cli "$work/core"
( cd "$work/core" && git checkout --quiet "$core_sha" \
&& cargo build --release --locked -p marqdo-cli )
export MARQDO_BIN="$work/core/target/release/marqdo"
version="$(python3 -c 'import re,pathlib;print(re.search(r"(?m)^version\s*=\s*\"([^\"]+)\"", pathlib.Path("Cargo.toml").read_text()).group(1))')"
python3 tools/release/package.py --source-sha "$CI_COMMIT_SHA" --version "$version"
python3 tools/release/smoke.py --archive "dist/marqdo-knowledge-$version-x86_64-unknown-linux-gnu.tar.gz" --evidence-out dist/smoke-evidence.json
- cat dist/RELEASE_INFO.json
- cat dist/*.tar.gz.sha256
- cat dist/smoke-evidence.json