Let Agents explizite target workflows by labels
Opened this issue · 2 comments
6543 commented
ontop of #4141:
### `WOODPECKER_AGENT_LABELS`
> Default: empty
Configures custom labels for the agent, to let workflows filter by it.
Use a list of key-value pairs like `key=value,second-key=*`. `*` can be used as a wildcard.
+If you use `!` as key prefix it is mandatory for the workflow to have that label set (without !) set and matched.
By default, agents provide three additional labels `platform=os/arch`, `hostname=my-agent` and `repo=*` which can be overwritten if needed.
To learn how labels work, check out the [pipeline syntax page](../20-usage/20-workflow-syntax.md#labels).
Originally posted by @6543 in #3483 (comment)
6543 commented
currently agents advertise there capabilities via labels ... but can not make sure to only get worklows that actually require them
this proposes an extention to have that option
zc-devs commented
Why not to implement it like in Kubernetes?
https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/