diff --git a/.tekton/managed-upgrade-operator-e2e-pull-request.yaml b/.tekton/managed-upgrade-operator-e2e-pull-request.yaml new file mode 100644 index 00000000..9e4e4a0c --- /dev/null +++ b/.tekton/managed-upgrade-operator-e2e-pull-request.yaml @@ -0,0 +1,53 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.openshift.io/repo: https://github.com/openshift/managed-upgrade-operator?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/cancel-in-progress: 'true' + pipelinesascode.tekton.dev/max-keep-runs: '3' + pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "master" + creationTimestamp: null + labels: + appstudio.openshift.io/application: managed-upgrade-operator + appstudio.openshift.io/component: managed-upgrade-operator-e2e + pipelines.appstudio.openshift.io/type: build + name: managed-upgrade-operator-e2e-on-pull-request + namespace: managed-upgrade-operator-tenant +spec: + params: + - name: git-url + value: '{{source_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/redhat-user-workloads/managed-upgrade-operator-tenant/openshift/managed-upgrade-operator-e2e:on-pr-{{revision}} + - name: image-expires-after + value: 5d + - name: dockerfile + value: test/e2e/Dockerfile + - name: path-context + value: . + workspaces: + - name: git-auth + optional: true + - name: netrc + optional: true + taskRunTemplate: + serviceAccountName: build-pipeline-managed-upgrade-operator-e2e + workspaces: + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' + pipelineRef: + resolver: git + params: + - name: url + value: https://github.com/openshift/boilerplate + - name: revision + value: master + - name: pathInRepo + value: pipelines/docker-build-oci-ta/pipeline.yaml +status: {} \ No newline at end of file diff --git a/.tekton/managed-upgrade-operator-e2e-push.yaml b/.tekton/managed-upgrade-operator-e2e-push.yaml new file mode 100644 index 00000000..ee01a96c --- /dev/null +++ b/.tekton/managed-upgrade-operator-e2e-push.yaml @@ -0,0 +1,50 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.openshift.io/repo: https://github.com/openshift/managed-upgrade-operator?rev={{revision}} + build.appstudio.redhat.com/commit_sha: '{{revision}}' + build.appstudio.redhat.com/target_branch: '{{target_branch}}' + pipelinesascode.tekton.dev/cancel-in-progress: 'false' + pipelinesascode.tekton.dev/max-keep-runs: '3' + pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "master" + creationTimestamp: null + labels: + appstudio.openshift.io/application: managed-upgrade-operator + appstudio.openshift.io/component: managed-upgrade-operator-e2e + pipelines.appstudio.openshift.io/type: build + name: managed-upgrade-operator-e2e-on-push + namespace: managed-upgrade-operator-tenant +spec: + params: + - name: git-url + value: '{{source_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/redhat-user-workloads/managed-upgrade-operator-tenant/openshift/managed-upgrade-operator-e2e:{{revision}} + - name: dockerfile + value: test/e2e/Dockerfile + - name: path-context + value: . + workspaces: + - name: git-auth + optional: true + - name: netrc + optional: true + taskRunTemplate: + serviceAccountName: build-pipeline-managed-upgrade-operator-e2e + workspaces: + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' + pipelineRef: + resolver: git + params: + - name: url + value: https://github.com/openshift/boilerplate + - name: revision + value: master + - name: pathInRepo + value: pipelines/docker-build-oci-ta/pipeline.yaml +status: {} diff --git a/.tekton/managed-upgrade-operator-pull-request.yaml b/.tekton/managed-upgrade-operator-pull-request.yaml index 37f39153..d33cb85a 100644 --- a/.tekton/managed-upgrade-operator-pull-request.yaml +++ b/.tekton/managed-upgrade-operator-pull-request.yaml @@ -8,11 +8,7 @@ metadata: build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/cancel-in-progress: 'true' pipelinesascode.tekton.dev/max-keep-runs: '3' - pipelinesascode.tekton.dev/on-cel-expression: "event == \"pull_request\"\n&& target_branch\ - \ == \"master\"\n&& (\"**/*.go\".pathChanged() ||\n \"**/go.*\".pathChanged()\ - \ ||\n \"**/*.yaml\".pathChanged() ||\n \"**/*.yml\".pathChanged() ||\n\ - \ \"build/Dockerfile\".pathChanged() ||\n \".tekton/managed-upgrade-operator-pull-request.yaml\"\ - .pathChanged() )\n" + pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "master" creationTimestamp: null labels: appstudio.openshift.io/application: managed-upgrade-operator @@ -34,6 +30,11 @@ spec: value: build/Dockerfile - name: path-context value: . + workspaces: + - name: git-auth + optional: true + - name: netrc + optional: true taskRunTemplate: serviceAccountName: build-pipeline-managed-upgrade-operator workspaces: @@ -49,4 +50,4 @@ spec: value: master - name: pathInRepo value: pipelines/docker-build-oci-ta/pipeline.yaml -status: {} +status: {} \ No newline at end of file diff --git a/.tekton/managed-upgrade-operator-push.yaml b/.tekton/managed-upgrade-operator-push.yaml index 5eb90375..9a8cf9b9 100644 --- a/.tekton/managed-upgrade-operator-push.yaml +++ b/.tekton/managed-upgrade-operator-push.yaml @@ -7,11 +7,7 @@ metadata: build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/cancel-in-progress: 'false' pipelinesascode.tekton.dev/max-keep-runs: '3' - pipelinesascode.tekton.dev/on-cel-expression: "event == \"push\"\n&& target_branch\ - \ == \"master\"\n&& (\"**/*.go\".pathChanged() ||\n \"**/go.*\".pathChanged()\ - \ ||\n \"**/*.yaml\".pathChanged() ||\n \"**/*.yml\".pathChanged() ||\n\ - \ \"build/Dockerfile\".pathChanged() ||\n \".tekton/managed-upgrade-operator-push.yaml\"\ - .pathChanged() )\n" + pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "master" creationTimestamp: null labels: appstudio.openshift.io/application: managed-upgrade-operator @@ -31,6 +27,11 @@ spec: value: build/Dockerfile - name: path-context value: . + workspaces: + - name: git-auth + optional: true + - name: netrc + optional: true taskRunTemplate: serviceAccountName: build-pipeline-managed-upgrade-operator workspaces: