From 6c116b9ef2d41f37a1b946e4b6380be0d857cc2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20G=C3=B6rn?= Date: Tue, 15 Aug 2023 09:38:24 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20add=20Pipelines=20as=20Code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .tekton/repository.yaml | 6 +++++ .tekton/tox-on-pr.yaml | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .tekton/repository.yaml create mode 100644 .tekton/tox-on-pr.yaml diff --git a/.tekton/repository.yaml b/.tekton/repository.yaml new file mode 100644 index 0000000..030e9f0 --- /dev/null +++ b/.tekton/repository.yaml @@ -0,0 +1,6 @@ +apiVersion: pipelinesascode.tekton.dev/v1alpha1 +kind: Repository +metadata: + name: micropipenv +spec: + url: https://github.com/goern/micropipenv diff --git a/.tekton/tox-on-pr.yaml b/.tekton/tox-on-pr.yaml new file mode 100644 index 0000000..20a2e5b --- /dev/null +++ b/.tekton/tox-on-pr.yaml @@ -0,0 +1,52 @@ +apiVersion: tekton.dev/v1beta1 +kind: Pipeline +metadata: + name: tox-on-pr + annotations: + pipelinesascode.tekton.dev/on-target-branch: "[master]" + pipelinesascode.tekton.dev/on-event: "[pull_request]" +spec: + workspaces: + - name: shared-workspace + params: + - name: git-url + type: string + description: url of the git repo for the code of deployment + default: https://github.com/goern/micropipenv + - name: git-revision + type: string + description: revision to be used from repo of the code for deployment + default: pipeline-as-code + - name: IMAGE + type: string + description: image to be built from the code + default: micropipenv + tasks: + - name: fetch-repository + taskRef: + name: git-clone + kind: ClusterTask + workspaces: + - name: output + workspace: shared-workspace + params: + - name: url + value: $(params.git-url) + - name: subdirectory + value: "" + - name: deleteExisting + value: "true" + - name: revision + value: $(params.git-revision) + - name: build-image + taskRef: + name: buildah + kind: ClusterTask + params: + - name: IMAGE + value: $(params.IMAGE) + workspaces: + - name: source + workspace: shared-workspace + runAfter: + - fetch-repository