triggers
triggers copied to clipboard
getting started example error
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
Additional Info
-
Kubernetes version:
Output of
kubectl version
:
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.2", GitCommit:"31aa3e89a926f81aa0af30320ffcb71acadf3015", GitTreeState:"clean", BuildDate:"2023-04-19T07:34:25Z", GoVersion:"go1.19.6", Compiler:"gc", Platform:"linux/amd64"} Kustomize Version: v4.5.7 Server Version: version.Info{Major:"1", Minor:"26+", GitVersion:"v1.26.7-eks-2d98532", GitCommit:"c9c3fc1fdf677f38b8d26568c10b921a1235fa43", GitTreeState:"clean", BuildDate:"2023-07-28T16:51:21Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}
- Tekton Pipeline version:
**Output of `tkn version` or `kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'`**
v0.50.0
<!-- Any other additional information -->
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.
Reference https://github.com/tektoncd/catalog/blob/main/task/cloudevent/0.1/samples/run.yaml
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.