03-sensor-github.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. apiVersion: argoproj.io/v1alpha1
  2. kind: Sensor
  3. metadata:
  4. name: github
  5. spec:
  6. template:
  7. serviceAccountName: argo-events-sa
  8. dependencies:
  9. - name: test-dep
  10. gatewayName: github
  11. eventName: example
  12. subscription:
  13. http:
  14. port: 9300
  15. triggers:
  16. - template:
  17. name: github-workflow-trigger
  18. k8s:
  19. group: argoproj.io
  20. version: v1alpha1
  21. resource: workflows
  22. operation: create
  23. source:
  24. resource:
  25. apiVersion: argoproj.io/v1alpha1
  26. kind: Workflow
  27. metadata:
  28. generateName: github-
  29. spec:
  30. entrypoint: whalesay
  31. arguments:
  32. parameters:
  33. - name: message
  34. # value will get overridden by the event payload
  35. value: hello world
  36. templates:
  37. - name: whalesay
  38. inputs:
  39. parameters:
  40. - name: message
  41. container:
  42. image: docker/whalesay:latest
  43. command: [cowsay]
  44. args: ["{{inputs.parameters.message}}"]
  45. parameters:
  46. - src:
  47. dependencyName: test-dep
  48. dest: spec.arguments.parameters.0.value