1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- apiVersion: argoproj.io/v1alpha1
- kind: WorkflowTemplate
- metadata:
- name: andor
- spec:
- entrypoint: approve-flow
- arguments:
- parameters:
- - name: object
- value: {}
- templates:
- - name: approve-flow
- inputs:
- parameters:
- - name: object
- dag:
- tasks:
- - name: A
- template: approval
- - name: B
- template: approval
- depends: "A.Succeeded"
- when: "{{ tasks.A.outputs.parameters.approve }} == 通过"
- - name: C
- template: approval
- depends: "A.Succeeded"
- when: "{{ tasks.A.outputs.parameters.approve }} == 通过"
- - name: D
- template: approval
- depends: "B.Succeeded && C.Succeeded"
- when: "({{ tasks.B.outputs.parameters.approve }} == 通过) && ({{ tasks.C.outputs.parameters.approve }} == 通过)"
- - name: E
- template: approval
- depends: "B.Succeeded && C.Succeeded"
- when: "({{ tasks.B.outputs.parameters.approve }} == 通过) && ({{ tasks.C.outputs.parameters.approve }} == 通过)"
- - name: F
- template: approval
- depends: "D.Succeeded && E.Succeeded"
- when: "({{ tasks.D.outputs.parameters.approve }} == 通过) || ({{ tasks.E.outputs.parameters.approve }} == 通过)"
-
- - name: approval
- suspend: {}
- inputs:
- parameters:
- - name: approve
- default: '通过'
- enum:
- - '通过'
- - '拒绝'
- - '忽略'
- outputs:
- parameters:
- - name: approve
- valueFrom:
- supplied: {}
|