diff --git a/.tekton/tekton-caches-main-cache-pull-request.yaml b/.tekton/tekton-caches-main-cache-pull-request.yaml index bf0af6798..e2c2cb492 100644 --- a/.tekton/tekton-caches-main-cache-pull-request.yaml +++ b/.tekton/tekton-caches-main-cache-pull-request.yaml @@ -8,7 +8,12 @@ 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" && + ("***".pathChanged() || + ".konflux/dockerfiles/cache.Dockerfile".pathChanged() || + ".tekton/tekton-caches-main-cache-pull-request.yaml".pathChanged() || + ".tekton/docker-build-ta.yaml".pathChanged()) creationTimestamp: null labels: appstudio.openshift.io/application: tekton-caches-main diff --git a/.tekton/tekton-caches-main-cache-push.yaml b/.tekton/tekton-caches-main-cache-push.yaml index 4db14ecb7..ec53cd60f 100644 --- a/.tekton/tekton-caches-main-cache-push.yaml +++ b/.tekton/tekton-caches-main-cache-push.yaml @@ -7,7 +7,12 @@ 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" && + ("***".pathChanged() || + ".konflux/dockerfiles/cache.Dockerfile".pathChanged() || + ".tekton/tekton-caches-main-cache-push.yaml".pathChanged() || + ".tekton/docker-build-ta.yaml".pathChanged()) creationTimestamp: null labels: appstudio.openshift.io/application: tekton-caches-main diff --git a/.tekton/tekton-caches-next-cache-pull-request.yaml b/.tekton/tekton-caches-next-cache-pull-request.yaml new file mode 100644 index 000000000..4c7bd6469 --- /dev/null +++ b/.tekton/tekton-caches-next-cache-pull-request.yaml @@ -0,0 +1,48 @@ +# Generated by openshift-pipelines/hack. DO NOT EDIT. +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/tekton-caches?rev={{revision}} + build.appstudio.redhat.com/commit_sha: '{{revision}}' + 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" && + ("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() || + ".konflux/dockerfiles/cache.Dockerfile".pathChanged() || + ".tekton/tekton-caches-next-cache-pull-request.yaml".pathChanged() || + ".tekton/docker-build-ta.yaml".pathChanged()) + creationTimestamp: null + labels: + appstudio.openshift.io/application: tekton-caches-next + appstudio.openshift.io/component: tekton-caches-next-cache + pipelines.appstudio.openshift.io/type: build + name: tekton-caches-next-cache-on-pull-request + namespace: tekton-ecosystem-tenant +spec: + params: + - name: git-url + value: '{{source_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/tekton-caches-next/cache:on-pr-{{revision}} + - name: image-expires-after + value: 5d + - name: dockerfile + value: .konflux/dockerfiles/cache.Dockerfile + - name: build-platforms + value: + - linux/x86_64 + - name: prefetch-input + value: | + {"type": "rpm", "path": ".konflux/rpms"} + pipelineRef: + name: docker-build-ta + workspaces: + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' +status: {} diff --git a/.tekton/tekton-caches-next-cache-push.yaml b/.tekton/tekton-caches-next-cache-push.yaml new file mode 100644 index 000000000..cd7cbc42b --- /dev/null +++ b/.tekton/tekton-caches-next-cache-push.yaml @@ -0,0 +1,46 @@ +# Generated by openshift-pipelines/hack. DO NOT EDIT. +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.openshift.io/repo: https://github.com/openshift-pipelines/tekton-caches?rev={{revision}} + 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" && + ("upstream/***".pathChanged() || ".konflux/patches/***".pathChanged() || ".konflux/rpms/***".pathChanged() || + ".konflux/dockerfiles/cache.Dockerfile".pathChanged() || + ".tekton/tekton-caches-next-cache-push.yaml".pathChanged() || + ".tekton/docker-build-ta.yaml".pathChanged()) + creationTimestamp: null + labels: + appstudio.openshift.io/application: tekton-caches-next + appstudio.openshift.io/component: tekton-caches-next-cache + pipelines.appstudio.openshift.io/type: build + name: tekton-caches-next-cache-on-push + namespace: tekton-ecosystem-tenant +spec: + params: + - name: git-url + value: '{{source_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/redhat-user-workloads/tekton-ecosystem-tenant/tekton-caches-next/cache:{{revision}} + - name: dockerfile + value: .konflux/dockerfiles/cache.Dockerfile + - name: build-platforms + value: + - linux/x86_64 + - linux-m2xlarge/arm64 + - name: prefetch-input + value: | + {"type": "rpm", "path": ".konflux/rpms"} + pipelineRef: + name: docker-build-ta + workspaces: + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' +status: {}