Skip to content

Commit

Permalink
fix: make sns-sensor example work (argoproj#1629)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-habib authored and BulkBeing committed Mar 7, 2022
1 parent 22f3298 commit a82d9cc
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions examples/sensors/aws-sns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,37 @@ spec:
metadata:
generateName: aws-sns-worfklow-
spec:
entrypoint: whalesay
entrypoint: main
arguments:
parameters:
- name: message
# value will be overridden by the event payload
value: hello world
templates:
- name: main
dag:
tasks:
- name: extract-message
template: extract-sns-message
arguments:
parameters:
- name: sns-message
value: "{{workflow.parameters.message}}"
- name: whalesay
dependencies: [extract-message]
template: whalesay
arguments:
parameters:
- name: message
value: "{{tasks.extract-message.outputs.result}}"
- name: extract-sns-message
inputs:
parameters:
- name: sns-message
script:
image: node:12-alpine
command: [node]
source: |
const snsMessage = {{inputs.parameters.sns-message}};
console.log(snsMessage.Message);
- name: whalesay
inputs:
parameters:
Expand Down

0 comments on commit a82d9cc

Please sign in to comment.