Skip to main content

Create EventListener via BPCTL

Creating an EventListener through BPCTL is extremely quick and simple. All you need to do is to provide a few details.

Here's a brief example showing all information that are required to Create an EventListener via BPCTL.

  • Metadata: This contains the name of the listener you want to create.
  • Spec/Events: This specifies the events for which you want the webhook to be triggered. Whenever these events will occur in the Git Repo, a notification will be sent.
  • Spec/Actions: This defines the actions to be executed once the EventListener receives the message.
  • Payload and Header conditions- This conatins the payload and header conditions.
  • Git Repo: This is the name of the GIT URL where the webhook has been configured.
1 - - -
2 version: api/v1
3 kind: BPGitEventListener
4 metadata:
5 name: spring3hibernate-application-listener
6 spec:
7 action_on_events:
8 - events:
9 -push
10 actions:
11 - action: PIPELINE_TRIGGER
12 project: EmployeeManagement
13 pipeline: spring3hibernate-build-pipeline
14 path: “.”
15 payload_conditions : [ ]
16 headers conditions : [ ]
17 is_pr_decorate : false
18 git_repo: spring3hibernate-repo

Example: Here, in this example,

  • The Listener name is spring3hibernate-application-listener.
  • The chosen Event is "Push".
  • The specified "Listener action trigger type" is Pipeline.
  • "spring3hibernate-build-pipeline" is the selected Pipeline in the project "EmployeeManagement".
  • "spring3hibernate-repo" is the GIT URL where the webhook has been configured.