currently, sh.tangled.pipeline event is emitted from tangled when git ref update triggered the pipeline.
Conceptually this is unnecessary logic for knot. We can make spindle to do this instead.
- spindle listen for
sh.tangled.git.refUpdatefrom knot event stream - when ref update happens, fetch repo from knot, parse
.tangled/workflows/*.ymland trigger the pipeline.
Benefits:#
- knot doesn't need to know anything about pipeline business. so when we update the spec, only spindle needs an upgrade
- one less event type
- pipeline trigger is more flexible than ever. Imagine custom spindle implementation that runs for
.github/workflowor.gitlab-ci.yml
Spindle is already ingesting from both atproto jetstream and knot event stream, and fetching the repo won't be huge performance issue as spindle can just sync the local git repo on refUpdate events.
Prerequirements:#
- internal git server module to sync from knots. (spindle only needs to sync hot repos, appview should sync all known repos)
For manual workflow triggers, we can implement it by adding
sh.tangled.pipeline.triggerPipelinexrpc endpoint to spindle.