signs.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. apiVersion: argoproj.io/v1alpha1
  2. kind: WorkflowTemplate
  3. metadata:
  4. name: buildAndOR
  5. spec:
  6. entrypoint: front_json-flow
  7. arguments:
  8. parameters:
  9. - name: object
  10. value: {}
  11. templates:
  12. - name: front_json-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.front_json }} == 通过"
  24. - name: C
  25. template: approval
  26. depends: "A.Succeeded"
  27. when: "{{ tasks.A.outputs.parameters.front_json }} == 通过"
  28. - name: D
  29. template: approval
  30. depends: "B.Succeeded && C.Succeeded"
  31. when: "({{ tasks.B.outputs.parameters.front_json }} == 通过) && ({{ tasks.C.outputs.parameters.front_json }} == 通过)"
  32. - name: E
  33. template: approval
  34. depends: "B.Succeeded && C.Succeeded"
  35. when: "({{ tasks.B.outputs.parameters.front_json }} == 通过) && ({{ tasks.C.outputs.parameters.front_json }} == 通过)"
  36. - name: F
  37. template: approval
  38. depends: "D.Succeeded && E.Succeeded"
  39. when: "({{ tasks.D.outputs.parameters.front_json }} == 通过) || ({{ tasks.E.outputs.parameters.front_json }} == 通过)"
  40. - name: approval
  41. suspend: {}
  42. inputs:
  43. parameters:
  44. - name: front_json
  45. default: '通过'
  46. enum:
  47. - '通过'
  48. - '拒绝'
  49. outputs:
  50. parameters:
  51. - name: front_json
  52. valueFrom:
  53. supplied: {}