From 8e9bddafd3bdd949beb2ff6bb01e050fb4adf66e Mon Sep 17 00:00:00 2001 From: Antoni Segura Puimedon Date: Fri, 13 Dec 2024 15:23:40 +0100 Subject: [PATCH] CNTRLPLANE-10: Konflux build CPO only when needed Changes that do not affect the Control Plane Operator should not trigger Konflux builds of the Control Plane Operator Signed-off-by: Antoni Segura Puimedon --- .tekton/control-plane-operator-main-pull-request.yaml | 6 ++++-- .tekton/control-plane-operator-main-push.yaml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.tekton/control-plane-operator-main-pull-request.yaml b/.tekton/control-plane-operator-main-pull-request.yaml index 40457e4e8b..6a2a992c4c 100644 --- a/.tekton/control-plane-operator-main-pull-request.yaml +++ b/.tekton/control-plane-operator-main-pull-request.yaml @@ -7,8 +7,10 @@ metadata: build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch - == "main" + pipelinesascode.tekton.dev/on-cel-expression: | + event == "pull_request" + && target_branch == "main" + && ( "control-plane-operator/***".pathChanged() || "support/***".pathChanged() || "/Containerfile.control-plane-operator".pathChanged() ) creationTimestamp: null labels: appstudio.openshift.io/application: control-plane-operator diff --git a/.tekton/control-plane-operator-main-push.yaml b/.tekton/control-plane-operator-main-push.yaml index a7285c7a18..b36e6a35c9 100644 --- a/.tekton/control-plane-operator-main-push.yaml +++ b/.tekton/control-plane-operator-main-push.yaml @@ -6,8 +6,10 @@ metadata: build.appstudio.redhat.com/commit_sha: '{{revision}}' build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch - == "main" + pipelinesascode.tekton.dev/on-cel-expression: | + event == "push" + && target_branch == "main" + && ( "control-plane-operator/***".pathChanged() || "support/***".pathChanged() || "/Containerfile.control-plane-operator".pathChanged() ) creationTimestamp: null labels: appstudio.openshift.io/application: control-plane-operator