Skip to content

Commit

Permalink
feat: ✨ add a tag-release pipeline publishing to quay
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Görn <[email protected]>
  • Loading branch information
goern committed Sep 13, 2023
1 parent 73fb53d commit 75e3351
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions .tekton/on-tag-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: on-tag-release
annotations:
pipelinesascode.tekton.dev/on-cel-expression: |
event == "push" && target_branch == "refs/tags/v.*"
pipelinesascode.tekton.dev/task: "[git-clone, buildah, .tekton/tasks/e2e-telemetry-test.yaml]"
pipelinesascode.tekton.dev/max-keep-runs: "5"

spec:
params:
- name: repo_url
value: "{{ repo_url }}"
- name: revision
value: "{{ revision }}"
taskRunSpecs:
- pipelineTaskName: build
taskServiceAccountName: pipelines-sa-userid-1000
- pipelineTaskName: push-to-quay
taskServiceAccountName: pipelines-sa-userid-1000
pipelineSpec:
params:
- name: repo_url
- name: revision
workspaces:
- name: source
tasks:
- name: fetch-repository
taskRef:
name: git-clone
workspaces:
- name: output
workspace: source
params:
- name: url
value: $(params.repo_url)
- name: revision
value: $(params.revision)

- name: e2e-tests
runAfter:
- fetch-repository
taskRef:
name: e2e-telemetry-test
workspaces:
- name: source
workspace: source

- name: build
taskRef:
name: buildah-as-userid-1000
kind: ClusterTask
runAfter:
- fetch-repository
params:
- name: IMAGE
value: image-registry.openshift-image-registry.svc:5000/$(context.pipelineRun.namespace)/paddock:$(params.revision)
- name: BUILDER_IMAGE
value: quay.io/buildah/stable:v1.31.0
- name: DOCKERFILE
value: Containerfile
- name: CONTEXT
value: components/paddock
workspaces:
- name: source
workspace: source

- name: push-to-quay
taskRef:
kind: ClusterTask
name: skopeo-copy
runAfter:
- build
# - e2e-tests
params:
- name: srcImageURL
value: docker://image-registry.openshift-image-registry.svc:5000/$(context.pipelineRun.namespace)/paddock:$(params.revision)
- name: destImageURL
value: docker://quay.io/b4mad/paddock:$(params.revision)
- name: srcTLSverify
value: "false"
- name: destTLSverify
value: "false"
workspaces:
- name: images-url
workspace: images-url

workspaces:
- name: source
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: images-url
emptyDir: {}

0 comments on commit 75e3351

Please sign in to comment.