Création d'un eventListener unique pour plusieurs pipelines

This commit is contained in:
Matthieu Lamalle 2024-03-28 14:51:38 +01:00
parent 0705170ef5
commit 6ab3e4c579
2 changed files with 43 additions and 3 deletions

View File

@ -0,0 +1,39 @@
apiVersion: triggers.tekton.dev/v1beta1
kind: EventListener
metadata:
name: mseproject
spec:
serviceAccountName: tekton-robot
triggers:
- name: mse-symfonycheck-trigger
interceptors:
- ref:
name: "cel"
params:
# Filtre par événement
- name: "filter"
value: "body.action in ['opened', 'synchronized']"
bindings:
- ref: symfonycheck-binding
template:
ref: symfonycheck-template
- name: mse-build-trigger
interceptors:
- ref:
name: "cel"
params:
# Filtre par événement
- name: "filter"
value: "body.pull_request.merged == true"
# Récupération du queryParam registry
- name: "overlays"
value:
- key: registry
expression: "requestURL.parseURL().query['registry']"
bindings:
- ref: msebuild-binding
- name: registry
value: $(extensions.registry)
template:
ref: msebuild-template

View File

@ -39,9 +39,10 @@ resources:
- trigger/symfonycheck-template.yaml
# Events
- event/msebuild.yaml
- event/imagebuild.yaml
- event/symfonycheck.yaml
- event/mseproject.yaml
# - event/msebuild.yaml
# - event/imagebuild.yaml
# - event/symfonycheck.yaml
# Ingress
# - ingress/dashboard.yaml