Skip to content

Commit

Permalink
CNTRLPLANE-10: Konflux build CPO only when needed
Browse files Browse the repository at this point in the history
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 <antoni@redhat.com>
  • Loading branch information
celebdor committed Dec 13, 2024
1 parent 2213200 commit 8e9bdda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .tekton/control-plane-operator-main-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions .tekton/control-plane-operator-main-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e9bdda

Please sign in to comment.