Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCP 4.8 Java lab - trigger not working #200

Open
mandibuswell opened this issue Aug 29, 2021 · 1 comment
Open

OCP 4.8 Java lab - trigger not working #200

mandibuswell opened this issue Aug 29, 2021 · 1 comment

Comments

@mandibuswell
Copy link
Contributor

I tried the current 4.6 lab with the amended pipeline and trigger yamls for 4.7 on a 4.8 install and everything worked except the trigger step.
I used this GIST to accelerate through
https://gist.github.com/mandibuswell/c1d3d61f9413cf849146ca6e1798b4eb

[mbuswell-redhat.com@bastion agnosticd]$ oc create -f https://raw.githubusercontent.com/openshift-roadshow/nationalparks/master/pipeline/nationalparks-triggers.yaml
triggertemplate.triggers.tekton.dev/nationalparks created
triggerbinding.triggers.tekton.dev/nationalparks created
route.route.openshift.io/el-nationalparks created
Error from server (BadRequest): error when creating "https://raw.githubusercontent.com/openshift-roadshow/nationalparks/master/pipeline/nationalparks-triggers.yaml": admission webhook "webhook.triggers.tekton.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "name"

In addition of course, the imagery will need updating.

@mandibuswell
Copy link
Contributor Author

mandibuswell commented Aug 29, 2021

I have confirmed that by setting the name to ref in template this works

---
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
  name: nationalparks
spec:
  params:
  - name: git-repo-url
    value: $(body.repository.clone_url)
  - name: git-repo-name
    value: $(body.repository.name)
  - name: git-revision
    value: $(body.after)
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
  name: nationalparks
spec:
  serviceAccountName: pipeline
  triggers:
  - bindings:
    - ref: nationalparks
    template:
      **ref: nationalparks**
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  labels:
    app.kubernetes.io/managed-by: EventListener
    app.kubernetes.io/part-of: Triggers
    eventlistener: nationalparks
  name: el-nationalparks
spec:
  port:
    targetPort: http-listener
  to:
    kind: Service
    name: el-nationalparks
    weight: 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant