Comments (5)
Hi @savitaashture can you please help me on this.
from triggers.
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
from triggers.
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.
from triggers.
@tppalani just making sure - @vinamra28 's example used value: body.ref == 'refs/heads/main'
- if you branch name is master, you'd want to use refs/heads/master
.
If that is not the issue, then could you please provide logs from the eventlistener?
from triggers.
Related Issues (20)
- Cannot delete EventListener with servicePort configured HOT 2
- TriggerTemplate unable to use JSON array as parameter HOT 9
- `githubOwners` not creating pipelinerun/taskrun when the owner creates a pull request from different branch HOT 6
- `githubOwners` and `addChangedFiles` do not work together when the `eventType` is `issue_comment` HOT 3
- Add CEL macro to fetch data from ConfigMap HOT 8
- Provide a mechanism to more easily access the "event" in a workspace in pipelines HOT 3
- Add Annotation to integrate Triggers with Results HOT 2
- Error from server (MethodNotAllowed): error when creating "sklearn-logging.yaml": create not allowed while custom resource definition is terminating HOT 3
- EventListener - unable to define NodePort (Question) HOT 1
- Mystery clusterrole reference in docs/getting-started HOT 1
- Whether the resourcetemplates in TriggerTemplate consider adding 'ref' field for decoupling HOT 2
- FYI - knative/pkg will drop use of generated k8s client backed by a dynamic client
- Tekton Trigger Eventlistener bitbucket
- Event listener no able to detect the changes from the bitbucket server HOT 2
- CE response from sink fails for the Eventing MT ingress broker HOT 3
- Document CloudEvent Response Behavior HOT 4
- k8s Events not being created during processing of Triggers HOT 3
- 38% of pods on my cluster are event listeners, too many for AWS EKS, Tekton should not stress pod limits HOT 2
- Unable in trigger object to use a serviceaccount from an other namespace HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from triggers.