diff --git a/.tekton/master-pull-request.yaml b/.tekton/master-pull-request.yaml new file mode 100644 index 0000000..8d20717 --- /dev/null +++ b/.tekton/master-pull-request.yaml @@ -0,0 +1,55 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.openshift.io/repo: https://github.com/app-sre/git-partition-sync-consumer?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: "20" + pipelinesascode.tekton.dev/on-cel-expression: (event == "pull_request" && target_branch == "master") || (event == "push" && target_branch.startsWith("gh-readonly-queue/master/")) + labels: + appstudio.openshift.io/application: git-partition-sync-consumer-master + appstudio.openshift.io/component: git-partition-sync-consumer-master + pipelines.appstudio.openshift.io/type: build + name: git-partition-sync-consumer-master-on-pull-request + namespace: app-sre-tenant +spec: + params: + - name: git-url + value: '{{source_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/redhat-user-workloads/app-sre-tenant/git-partition-sync-consumer-master/git-partition-sync-consumer-master:on-pr-{{revision}} + - name: image-expires-after + value: 5d + - name: dockerfile + value: Dockerfile + - name: path-context + value: . + - name: target-stage + value: test + pipelineRef: + resolver: git + params: + - name: url + value: https://github.com/app-sre/shared-pipelines + - name: revision + value: main + - name: pathInRepo + value: pipelines/multi-arch-build-pipeline.yaml + taskRunTemplate: + serviceAccountName: build-pipeline-git-partition-sync-consumer-master + workspaces: + - name: workspace + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' diff --git a/.tekton/master-push.yaml b/.tekton/master-push.yaml new file mode 100644 index 0000000..992b97e --- /dev/null +++ b/.tekton/master-push.yaml @@ -0,0 +1,52 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.openshift.io/repo: https://github.com/app-sre/git-partition-sync-consumer-master?rev={{revision}} + build.appstudio.redhat.com/commit_sha: '{{revision}}' + build.appstudio.redhat.com/target_branch: '{{target_branch}}' + pipelinesascode.tekton.dev/max-keep-runs: "20" + pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "master" + labels: + appstudio.openshift.io/application: git-partition-sync-consumer-master + appstudio.openshift.io/component: git-partition-sync-consumer-master + pipelines.appstudio.openshift.io/type: build + name: git-partition-sync-consumer-master-on-push + namespace: app-sre-tenant +spec: + params: + - name: git-url + value: '{{source_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/redhat-user-workloads/app-sre-tenant/git-partition-sync-consumer-master/git-partition-sync-consumer-master:{{revision}} + - name: dockerfile + value: Dockerfile + - name: path-context + value: . + - name: target-stage + value: prod + pipelineRef: + resolver: git + params: + - name: url + value: https://github.com/app-sre/shared-pipelines + - name: revision + value: main + - name: pathInRepo + value: pipelines/multi-arch-build-pipeline.yaml + taskRunTemplate: + serviceAccountName: build-pipeline-git-partition-sync-consumer-master + workspaces: + - name: workspace + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' \ No newline at end of file