我正在寻找一种使用 webhook json 有效负载键触发工作流的方法,例如如果有效负载是 {"action":"copy","id":"someid"}
在触发器上
triggers:
template:
- "group1"
"use this template if action key is 'copy'"
- "group2"
"use this template" if action key is 'move'"
我创建了一个示例传感器文件,但是 argo sersor 抱怨 eventSourceName 使用了多次。
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: testing-sensor
spec:
template:
serviceAccountName: argo
dependencies:
- name: data
eventSourceName: testhook
eventName: test
filters:
data:
- path: body.message
type: string
value:
- copy
- name: data1
eventSourceName: testhook
eventName: test
filters:
data:
- path: body.message
type: string
value:
- move
triggers:
- template:
conditions: "data"
name: group-1
- template:
conditions: "data1"
name: group-2
如果有人可以提供帮助,那就太好了