signs1.yaml 988 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. apiVersion: argoproj.io/v1alpha1
  2. kind: WorkflowTemplate
  3. metadata:
  4. name: signs
  5. spec:
  6. entrypoint: approve-flow
  7. arguments:
  8. parameters:
  9. - name: object
  10. value: {}
  11. templates:
  12. - name: approve-flow
  13. inputs:
  14. parameters:
  15. - name: object
  16. dag:
  17. tasks:
  18. - name: A
  19. template: approval
  20. - name: B
  21. template: approval
  22. depends: "A.Succeeded"
  23. when: "{{ tasks.A.outputs.parameters.approve }} == 通过"
  24. - name: C
  25. template: approval
  26. depends: "B.Succeeded"
  27. when: "{{ tasks.B.outputs.parameters.approve }} == 通过"
  28. - name: approval
  29. suspend: {}
  30. inputs:
  31. parameters:
  32. - name: approve
  33. default: '通过'
  34. enum:
  35. - '通过'
  36. - '拒绝'
  37. outputs:
  38. parameters:
  39. - name: approve
  40. valueFrom:
  41. supplied: {}