mvazquezc / code-to-prod-demo

Repository for demoing code to production using Tekton for CI and Argo CD for CD
18 stars 43 forks source link

create webhook.yaml #1

Open hupiper opened 3 years ago

hupiper commented 3 years ago

oc -n reversewords-ci create -f webhook.yaml triggertemplate.triggers.tekton.dev/reverseword-build-triggertemplate created Error from server (BadRequest): error when creating "webhook.yaml": admission webhook "validation.webhook.triggers.tekton.dev" denied the request: validation failed: missing field(s): spec.triggers[0].bindings[0].Value

Currently the name is being set - looks like it need a value too. I'm not sure which tt value to use.

hupiper commented 3 years ago

It looks like the webhook event listener should be something like this:

apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
  name: reversewords-webhook
spec:
  serviceAccountName: reversewords-pipeline
  triggers:
    - name: git-reversewords-trigger
      interceptors:
        - github:
            secretRef:
              secretName: webhook-secret
              secretKey: secret
            eventTypes:
              - push
      bindings:
        - ref: github-triggerbinding
      template:
        ref: reverseword-build-triggertemplate