-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjhipster-pipeline.yaml
232 lines (231 loc) · 5.93 KB
/
jhipster-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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: workspace
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 2Gi
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: npm
spec:
description: >-
This task can be used to run npm goals on a project.
This task can be used to run npm goals on a project where package.json is
present and has some pre-defined npm scripts.
params:
- default: .
description: The path where package.json of the project is defined.
name: PATH_CONTEXT
type: string
- default:
- version
description: The npm goals you want to run.
name: ARGS
type: array
- default: 'docker.io/library/node:18.18.2-alpine'
description: The node image you want to use.
name: IMAGE
type: string
steps:
- args:
- $(params.ARGS)
command:
- npm
computeResources: {}
env:
- name: CI
value: 'true'
image: $(params.IMAGE)
name: npm-run
workingDir: $(workspaces.source.path)/$(params.PATH_CONTEXT)
workspaces:
- name: source
---
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: jhipster
spec:
params:
- default: >-
image-registry.openshift-image-registry.svc:5000/maximilianopizarro5-dev/jhipster
name: IMAGE_NAME
type: string
- default: /
name: PATH_CONTEXT
type: string
- default: >-
registry.redhat.io/ubi8/openjdk-17@sha256:af305e087061cbaa4107ce0b304a1ef987f6b54bae3f75bfd529cfd084cba9b5
name: MAVEN_IMAGE
type: string
- default: appdemo-0.0.1-SNAPSHOT.jar
name: APP_JAR_VERSION
type: string
- default: jhipster
name: APP_NAME
type: string
- default: 'https://github.com/maximilianoPizarro/app-demo-jhipster-react'
name: GIT_REPO
type: string
- default: main
name: GIT_BRANCH
type: string
tasks:
- name: maven
params:
- name: MAVEN_IMAGE
value: >-
registry.redhat.io/ubi8/openjdk-17@sha256:af305e087061cbaa4107ce0b304a1ef987f6b54bae3f75bfd529cfd084cba9b5
- name: GOALS
value:
- clean
- verify
- '-Pprod'
- >-
-Dmaven.repo.local=$(workspaces.source.path)/$(params.PATH_CONTEXT)/.m2
- '-Dmaven.test.skip=true'
- name: MAVEN_MIRROR_URL
value: ''
- name: SERVER_USER
value: ''
- name: SERVER_PASSWORD
value: ''
- name: PROXY_USER
value: ''
- name: PROXY_PASSWORD
value: ''
- name: PROXY_PORT
value: ''
- name: PROXY_HOST
value: ''
- name: PROXY_NON_PROXY_HOSTS
value: ''
- name: PROXY_PROTOCOL
value: http
- name: CONTEXT_DIR
value: $(params.PATH_CONTEXT)
runAfter:
- npm
taskRef:
kind: ClusterTask
name: maven
workspaces:
- name: source
workspace: workspace
- name: maven-settings
workspace: workspace
- name: git-clone
params:
- name: url
value: $(params.GIT_REPO)
- name: revision
value: $(params.GIT_BRANCH)
- name: refspec
value: ''
- name: submodules
value: 'true'
- name: depth
value: '1'
- name: sslVerify
value: 'true'
- name: crtFileName
value: ca-bundle.crt
- name: subdirectory
value: ''
- name: sparseCheckoutDirectories
value: ''
- name: deleteExisting
value: 'true'
- name: httpProxy
value: ''
- name: httpsProxy
value: ''
- name: noProxy
value: ''
- name: verbose
value: 'true'
- name: gitInitImage
value: >-
registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14
- name: userHome
value: /home/git
taskRef:
kind: ClusterTask
name: git-clone
workspaces:
- name: output
workspace: workspace
- name: npm
params:
- name: PATH_CONTEXT
value: $(params.PATH_CONTEXT)
- name: ARGS
value:
- install
- name: IMAGE
value: 'docker.io/library/node:18.18.2-alpine'
runAfter:
- oc-apply-manifest
taskRef:
kind: Task
name: npm
workspaces:
- name: source
workspace: workspace
- name: s2i-binary-build
params:
- name: SCRIPT
value: >-
oc start-build jhipster-devspace
--from-file=$(workspaces.manifest-dir.path)/$(params.PATH_CONTEXT)/target/$(params.APP_JAR_VERSION)
- name: VERSION
value: latest
runAfter:
- maven
taskRef:
kind: ClusterTask
name: openshift-client
workspaces:
- name: manifest-dir
workspace: workspace
- name: deploy
params:
- name: SCRIPT
value: oc rollout status deploy/$(params.APP_NAME)
- name: VERSION
value: latest
runAfter:
- s2i-binary-build
taskRef:
kind: ClusterTask
name: openshift-client
workspaces:
- name: manifest-dir
workspace: workspace
- name: oc-apply-manifest
params:
- name: SCRIPT
value: >-
oc apply -f
https://raw.githubusercontent.com/maximilianoPizarro/jhipster-devspace/master/template.yaml
- name: VERSION
value: latest
runAfter:
- git-clone
taskRef:
kind: ClusterTask
name: openshift-client
workspaces:
- name: manifest-dir
workspace: workspace
workspaces:
- name: workspace
optional: false
finally: []