diff --git a/.tekton/network-observability-cli-ystream-pull-request.yaml b/.tekton/network-observability-cli-ystream-pull-request.yaml index 58828977..57ec0843 100644 --- a/.tekton/network-observability-cli-ystream-pull-request.yaml +++ b/.tekton/network-observability-cli-ystream-pull-request.yaml @@ -7,8 +7,23 @@ 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" && ( + ".tekton/***".pathChanged() || + ".dockerignore".pathChanged() || + "Dockerfile.downstream".pathChanged() || + "Dockerfile-args.downstream".pathChanged() || + "go.mod".pathChanged() || + "go.sum".pathChanged() || + "main.go".pathChanged() || + "Makefile".pathChanged() || + "cmd/***".pathChanged() || + "commands/***".pathChanged() || + "res/***".pathChanged() || + "scripts/***".pathChanged() || + ".mk/***".pathChanged() || + "LICENSE".pathChanged() + ) creationTimestamp: null labels: appstudio.openshift.io/application: netobserv-ystream diff --git a/.tekton/network-observability-cli-ystream-push.yaml b/.tekton/network-observability-cli-ystream-push.yaml index 0d670195..31b3e517 100644 --- a/.tekton/network-observability-cli-ystream-push.yaml +++ b/.tekton/network-observability-cli-ystream-push.yaml @@ -7,8 +7,25 @@ metadata: build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" # switch comment in/out at branch cut / release - # pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" - pipelinesascode.tekton.dev/on-cel-expression: "false" + pipelinesascode.tekton.dev/on-cel-expression: | + event == "push" && target_branch == "main" && ( + ".tekton/***".pathChanged() || + ".dockerignore".pathChanged() || + "Dockerfile.downstream".pathChanged() || + "Dockerfile-args.downstream".pathChanged() || + "go.mod".pathChanged() || + "go.sum".pathChanged() || + "main.go".pathChanged() || + "Makefile".pathChanged() || + "cmd/***".pathChanged() || + "commands/***".pathChanged() || + "res/***".pathChanged() || + "scripts/***".pathChanged() || + ".mk/***".pathChanged() || + "LICENSE".pathChanged() || + "vendor/***".pathChanged() + ) + # pipelinesascode.tekton.dev/on-cel-expression: "false" creationTimestamp: null labels: appstudio.openshift.io/application: netobserv-ystream