tektoncd / triggers

Event triggering with Tekton!
Apache License 2.0
552 stars 416 forks source link

getting started example error #1627

Open hemantha-kumara opened 1 year ago

hemantha-kumara commented 1 year ago

Expected Behavior

https://github.com/tektoncd/triggers/tree/main/docs/getting-started All jobs should move to the completed state

Actual Behavior

send-cloud-event-pod task is failing with the logs 'Currently sendevent only supports JSON event data'

Steps to Reproduce the Problem

1. 2. 3.

Additional Info

hemantha-kumara commented 1 year ago

The issue could be due to the pipeline task send-cloud-event is not having the below three params(especially data)

  - name: eventType
    value: "test-event-type"
  - name: source
    value: "event-source-5000"
  - name: data
    value: "{\"data\": \"dude\"}"

I added these three params in the pipeline and it started working.

hemantha-kumara commented 1 year ago

Reference https://github.com/tektoncd/catalog/blob/main/task/cloudevent/0.1/samples/run.yaml

Xieql commented 9 months ago

I recently followed the steps provided in the Getting Started guide of the Tekton Triggers repository at https://github.com/tektoncd/triggers/tree/main/docs/getting-started and encountered the same issue discussed in this thread.

It appears to be linked to the configuration in the pipeline.yaml file: https://github.com/tektoncd/triggers/blob/8b92bb2d4ec917eb3e48606a6a63be5acdb5a7b2/docs/getting-started/pipeline.yaml#L56-L69. An update to this part of the documentation might be beneficial.

As @hemantha-kumara mentioned, adding essential variables could resolve the issue. This update could prevent similar issues for new users and streamline the initial setup process.