Closed wstrange closed 3 years ago
The additional issue I encountered (not related to cron) is the parameter for the trigger template now requires the tt
prefix:
Old param: $(params.gitrevision)
New Parameter $(tt.params.gitrevision)
This worked for me:
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: test-cronjob
spec:
schedule: "10 9 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: trigger
image: curlimages/curl
args: ["curl", "-X", "POST" , "--data" ,"{}", "el-prod-listener:8080" ]
restartPolicy: Never
Thanks @wstrange
Sorry for the trouble. We made the params to tt.params change a while back so it is possible that this example was broken for a while (another issue that could be caught with #192 )
Seems like you have a working example now. Would you mind opening a PR with the fix?
Yep - I'll create a PR.
Triggering a pipeline using the cron example does not appear to work.
The cron performs:
It looks like recent additions to validate the event now expect a non empty payload:
https://github.com/tektoncd/triggers/blob/master/pkg/sink/validate_payload.go
Using curl gets me further:
The pipeline is triggered (good), but it looks like parameters set in the trigger template are not applied.
The pipeline fails to clone the
git
resource. This is from the TriggerTemplate:This same trigger template used to work prior to the v0.12.0. It looks like some default behavior has changed?
Additional Info
Kubernetes version:
Tekton Pipeline version: