-
Notifications
You must be signed in to change notification settings - Fork 419
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
Tekton Bitbucket Event listener only run when the master branch is changed #1607
Comments
Hi @savitaashture can you please help me on this. |
hi @tppalani, probably one interceptor won't work alone, you'll have to use CEL expressions as well in order to filter the request based on custom requirements such as - ref:
name: "cel"
params:
- name: "filter"
value: body.ref == 'refs/heads/main' so your resultant EventListener would turn up as apiVersion: triggers.tekton.dev/v1beta1
kind: EventListener
metadata:
name: bitbucket-event-listener
namespace: devops
spec:
serviceAccountName: tekton-triggers-example-sa
triggers:
- name: bitbucket-trigger-binding
interceptors:
- ref:
name: "bitbucket"
params:
- name: secretRef
value: null
- name: eventTypes
value:
- repo:refs_changed
- ref:
name: "cel"
params:
- name: "filter"
value: body.ref == 'refs/heads/main'
bindings:
- ref: bitbucket-trigger-binding
template:
ref: bitbucket-trigger-template @dibyom @savitaashture @khrm please correct me if I missed something here |
Hi @vinamra28 Thanks for the quick response. As per your instruction i have updated my event listener yaml file but now the pipeline is not getting triggered if target branch updated. |
@tppalani just making sure - @vinamra28 's example used |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
Hi Team,
Here the code.
Trigger-binding.yaml
Eventlistener.yaml
Trigger template
The text was updated successfully, but these errors were encountered: