forked from OpenLiberty/sample.daytrader8
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pipeline.yaml
100 lines (100 loc) · 2.1 KB
/
pipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: git-source-pvc2
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: image
spec:
type: image
params:
- name: url
value: image-registry.openshift-image-registry:5000/daytrader/sampledaytrader8
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: git
spec:
type: git
params:
- name: url
value: https://github.com/kameshsampath/sample.daytrader8
- name: revision
value: sko-demo
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: daytrader-pipeline
spec:
workspaces:
- name: shared-workspace
resources:
- name: build-image
type: image
- name: app-source
type: git
params:
- name: destination-image
default: "image-registry.openshift-image-registry.svc:5000/daytrader/sampledaytrader8"
- name: maven-mirror-url
default: "https://repo1.maven.org/maven2"
tasks:
- name: git-clone
taskRef:
name: git-clone
kind: ClusterTask
workspaces:
- name: output
workspace: shared-workspace
params:
- name: url
value: https://github.com/kameshsampath/sample.daytrader8
- name: revision
value: sko-demo
- name: subdirectory
value: ""
- name: deleteExisting
value: "true"
- name: build-app
taskRef:
name: buildah
kind: ClusterTask
runAfter:
- git-clone
workspaces:
- name: source
workspace: shared-workspace
params:
- name: IMAGE
value: "$(params.destination-image)"
- name: TLSVERIFY
value: "false"
- name: BUILD_EXTRA_ARGS
value: "--build-arg MAVEN_MIRROR_URL=$(params.maven-mirror-url)"
- name: deploy-app
taskRef:
name: openshift-client
kind: ClusterTask
params:
- name: ARGS
value:
- "apply"
- "-k"
- "/workspace/source/k8s/sampledaytrader8/prod/"
resources:
inputs:
- name: source
resource: app-source
runAfter:
- build-app