From 6ab3e4c57945fd8e307c9680c8add382f5cd325b Mon Sep 17 00:00:00 2001 From: Matthieu Lamalle Date: Thu, 28 Mar 2024 14:51:38 +0100 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20d'un=20eventListener=20unique?= =?UTF-8?q?=20pour=20plusieurs=20pipelines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/tekton/event/mseproject.yaml | 39 +++++++++++++++++++ kustomization/base/tekton/kustomization.yaml | 7 ++-- 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 kustomization/base/tekton/event/mseproject.yaml diff --git a/kustomization/base/tekton/event/mseproject.yaml b/kustomization/base/tekton/event/mseproject.yaml new file mode 100644 index 0000000..af67675 --- /dev/null +++ b/kustomization/base/tekton/event/mseproject.yaml @@ -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 diff --git a/kustomization/base/tekton/kustomization.yaml b/kustomization/base/tekton/kustomization.yaml index 2bcc3b8..a94d2e7 100644 --- a/kustomization/base/tekton/kustomization.yaml +++ b/kustomization/base/tekton/kustomization.yaml @@ -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