You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to trigger my TaskRun dynamically with Tekton Triggers. And in TriggerBinding, I use a param named dockerfile, and the value is a constant multiline string, it's shown as follows:
But it doesn't work. And the event listener pod logs messages with a level: error, the logs are shown as below:
{"level":"info","logger":"eventlistener","caller":"sink/sink.go:181","msg":"ResolvedParams : [{Name:gitrepositoryurl Value:git@github.com:gejunqiang/test-deploy-javawebapp.git} {Name:imageurl Value:hub.c.163.com/gejunqiang/poc-javawebapp} {Name:imagetag Value:v1} {Name:dockerfile Value:FROM alpine:3.9\nADD artifacts.tar.gz /artifacts/\n} {Name:gitrevision Value:master}]","knative.dev/controller":"eventlistener","/triggers-eventid":"njg45","/trigger":""}
{"level":"error","logger":"eventlistener","caller":"sink/sink.go:266","msg":"problem creating obj: &errors.errorString{s:\"couldn't unmarshal json: invalid character '\\\\n' in string literal\"}","knative.dev/controller":"eventlistener","/triggers-eventid":"njg45","/trigger":"","stacktrace":"github.com/tektoncd/triggers/pkg/sink.Sink.CreateResources\n\tgithub.com/tektoncd/triggers/pkg/sink/sink.go:266\ngithub.com/tektoncd/triggers/pkg/sink.Sink.processTrigger\n\tgithub.com/tektoncd/triggers/pkg/sink/sink.go:183\ngithub.com/tektoncd/triggers/pkg/sink.Sink.HandleEvent.func1\n\tgithub.com/tektoncd/triggers/pkg/sink/sink.go:94"}
{"level":"error","logger":"eventlistener","caller":"sink/sink.go:184","msg":"couldn't unmarshal json: invalid character '\\n' in string literal","knative.dev/controller":"eventlistener","/triggers-eventid":"njg45","/trigger":"","stacktrace":"github.com/tektoncd/triggers/pkg/sink.Sink.processTrigger\n\tgithub.com/tektoncd/triggers/pkg/sink/sink.go:184\ngithub.com/tektoncd/triggers/pkg/sink.Sink.HandleEvent.func1\n\tgithub.com/tektoncd/triggers/pkg/sink/sink.go:94"}
From the first line of logs, we can see that the TriggerBinding resolved params correctly. Then it caused an error: &errors.errorString{s:\"couldn't unmarshal json: invalid character '\\\\n' in string literal\"}". I guess maybe it's the problem with newline character in multiline string, Or maybe the way I use the TriggerBinding is wrong. Can someone give me some suggestions.
Additional Info
The version of Tekton Triggers: v0.8.1
The text was updated successfully, but these errors were encountered:
This should have been fixed with #823
Please feel free to reopen if this is still an issue!
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Problem Description
I want to trigger my TaskRun dynamically with Tekton Triggers. And in TriggerBinding, I use a param named dockerfile, and the value is a constant multiline string, it's shown as follows:
Then I use this command to call the event listener:
But it doesn't work. And the event listener pod logs messages with a level: error, the logs are shown as below:
From the first line of logs, we can see that the TriggerBinding resolved params correctly. Then it caused an error:
&errors.errorString{s:\"couldn't unmarshal json: invalid character '\\\\n' in string literal\"}"
. I guess maybe it's the problem with newline character in multiline string, Or maybe the way I use the TriggerBinding is wrong. Can someone give me some suggestions.Additional Info
The version of Tekton Triggers: v0.8.1
The text was updated successfully, but these errors were encountered: