Skip to content

Commit 68a4aa1

Browse files
authored
define konflux ci pipelines (#37)
1 parent 86e5728 commit 68a4aa1

File tree

2 files changed

+107
-0
lines changed

2 files changed

+107
-0
lines changed

.tekton/master-pull-request.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
apiVersion: tekton.dev/v1
2+
kind: PipelineRun
3+
metadata:
4+
annotations:
5+
build.appstudio.openshift.io/repo: https://github.com/app-sre/git-partition-sync-consumer?rev={{revision}}
6+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
7+
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
8+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
9+
pipelinesascode.tekton.dev/max-keep-runs: "20"
10+
pipelinesascode.tekton.dev/on-cel-expression: (event == "pull_request" && target_branch == "master") || (event == "push" && target_branch.startsWith("gh-readonly-queue/master/"))
11+
labels:
12+
appstudio.openshift.io/application: git-partition-sync-consumer-master
13+
appstudio.openshift.io/component: git-partition-sync-consumer-master
14+
pipelines.appstudio.openshift.io/type: build
15+
name: git-partition-sync-consumer-master-on-pull-request
16+
namespace: app-sre-tenant
17+
spec:
18+
params:
19+
- name: git-url
20+
value: '{{source_url}}'
21+
- name: revision
22+
value: '{{revision}}'
23+
- name: output-image
24+
value: quay.io/redhat-user-workloads/app-sre-tenant/git-partition-sync-consumer-master/git-partition-sync-consumer-master:on-pr-{{revision}}
25+
- name: image-expires-after
26+
value: 5d
27+
- name: dockerfile
28+
value: Dockerfile
29+
- name: path-context
30+
value: .
31+
- name: target-stage
32+
value: test
33+
pipelineRef:
34+
resolver: git
35+
params:
36+
- name: url
37+
value: https://github.com/app-sre/shared-pipelines
38+
- name: revision
39+
value: main
40+
- name: pathInRepo
41+
value: pipelines/multi-arch-build-pipeline.yaml
42+
taskRunTemplate:
43+
serviceAccountName: build-pipeline-git-partition-sync-consumer-master
44+
workspaces:
45+
- name: workspace
46+
volumeClaimTemplate:
47+
spec:
48+
accessModes:
49+
- ReadWriteOnce
50+
resources:
51+
requests:
52+
storage: 1Gi
53+
- name: git-auth
54+
secret:
55+
secretName: '{{ git_auth_secret }}'

.tekton/master-push.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
apiVersion: tekton.dev/v1
2+
kind: PipelineRun
3+
metadata:
4+
annotations:
5+
build.appstudio.openshift.io/repo: https://github.com/app-sre/git-partition-sync-consumer-master?rev={{revision}}
6+
build.appstudio.redhat.com/commit_sha: '{{revision}}'
7+
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
8+
pipelinesascode.tekton.dev/max-keep-runs: "20"
9+
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "master"
10+
labels:
11+
appstudio.openshift.io/application: git-partition-sync-consumer-master
12+
appstudio.openshift.io/component: git-partition-sync-consumer-master
13+
pipelines.appstudio.openshift.io/type: build
14+
name: git-partition-sync-consumer-master-on-push
15+
namespace: app-sre-tenant
16+
spec:
17+
params:
18+
- name: git-url
19+
value: '{{source_url}}'
20+
- name: revision
21+
value: '{{revision}}'
22+
- name: output-image
23+
value: quay.io/redhat-user-workloads/app-sre-tenant/git-partition-sync-consumer-master/git-partition-sync-consumer-master:{{revision}}
24+
- name: dockerfile
25+
value: Dockerfile
26+
- name: path-context
27+
value: .
28+
- name: target-stage
29+
value: prod
30+
pipelineRef:
31+
resolver: git
32+
params:
33+
- name: url
34+
value: https://github.com/app-sre/shared-pipelines
35+
- name: revision
36+
value: main
37+
- name: pathInRepo
38+
value: pipelines/multi-arch-build-pipeline.yaml
39+
taskRunTemplate:
40+
serviceAccountName: build-pipeline-git-partition-sync-consumer-master
41+
workspaces:
42+
- name: workspace
43+
volumeClaimTemplate:
44+
spec:
45+
accessModes:
46+
- ReadWriteOnce
47+
resources:
48+
requests:
49+
storage: 1Gi
50+
- name: git-auth
51+
secret:
52+
secretName: '{{ git_auth_secret }}'

0 commit comments

Comments
 (0)