forked from apache/incubator-kie-tools
-
Notifications
You must be signed in to change notification settings - Fork 6
334 lines (299 loc) · 17.6 KB
/
daily_dev_publish.yml
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
name: "Daily dev :: Publish"
on:
schedule:
- cron: "0 2 * * *" # 2am UTC everyday
workflow_dispatch:
jobs:
build:
if: github.repository == 'kiegroup/kie-tools'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
KIE_SANDBOX_EXTENDED_SERVICES_VERSION: "0.0.0"
KIE_TOOLS_BUILD__buildContainerImages: "true"
DMN_DEV_DEPLOYMENT__baseImageRegistry: "quay.io"
DMN_DEV_DEPLOYMENT__baseImageAccount: "kie-tools"
DMN_DEV_DEPLOYMENT__baseImageName: "dmn-dev-deployment-base-image"
DMN_DEV_DEPLOYMENT__baseImageTag: "daily-dev"
DMN_DEV_DEPLOYMENT__baseImageBuildTags: "daily-dev"
DMN_DEV_DEPLOYMENT__onlineEditorUrl: "https://kiegroup.github.io/kogito-online/dev"
EXTENDED_SERVICES__kieSandboxUrl: "https://kiegroup.github.io/kogito-online/dev"
ONLINE_EDITOR__gitCorsProxyUrl: "https://daily-dev-git-cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud"
KIE_SANDBOX__imageRegistry: "quay.io"
KIE_SANDBOX__imageAccount: "kie-tools"
KIE_SANDBOX__imageName: "kie-sandbox-image"
KIE_SANDBOX__imageBuildTags: "daily-dev"
KIE_SANDBOX_EXTENDED_SERVICES__imageRegistry: "quay.io"
KIE_SANDBOX_EXTENDED_SERVICES__imageAccount: "kie-tools"
KIE_SANDBOX_EXTENDED_SERVICES__imageName: "kie-sandbox-extended-services-image"
KIE_SANDBOX_EXTENDED_SERVICES__imageBuildTags: "daily-dev"
GIT_CORS_PROXY__imageRegistry: "quay.io"
GIT_CORS_PROXY__imageAccount: "kie-tools"
GIT_CORS_PROXY__imageName: "git-cors-proxy-image"
GIT_CORS_PROXY__imageBuildTags: "daily-dev"
OPENSHIFT_NAMESPACE: "kie-sandbox"
OPENSHIFT_PART_OF: "daily-dev-kie-sandbox-app"
DEPLOY_TAG: "daily-dev"
DASHBUILDER__viewerImageRegistry: "quay.io"
DASHBUILDER__viewerImageAccount: "kie-tools"
DASHBUILDER__viewerImageName: "dashbuilder-viewer-image"
DASHBUILDER__viewerImageBuildTags: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__dashbuilderViewerImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion: "0.0.0"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry: "quay.io"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount: "kie-tools"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName: "serverless-logic-web-tools-swf-builder-image"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageBuildTags: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry: "quay.io"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount: "kie-tools"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName: "serverless-logic-web-tools-base-builder-image"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageBuildTags: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__gitCorsProxyUrl: "https://daily-dev-git-cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud"
steps:
- name: "Support longpaths (Windows only)"
if: runner.os == 'Windows'
run: git config --system core.longpaths true
- name: "Clone kie-tools"
uses: actions/checkout@v3
with:
path: kie-tools
# This bash script will set an output version for this step. It can be used with steps.version.outputs.version
- name: "Output version"
id: version
run: |
cd kie-tools
echo "version=$(node -e "console.log(require('./package.json').version);")" >> $GITHUB_OUTPUT
shell: bash
- name: "Cache Maven packages"
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: ~/.m2
key: ${{ runner.os }}-daily-dev-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-daily-dev-m2
- name: "Setup environment"
uses: ./kie-tools/.github/actions/setup-env
with:
working_dir: kie-tools
- name: "Bootstrap"
id: bootstrap
uses: ./kie-tools/.github/actions/bootstrap
with:
working_dir: kie-tools
- name: "Build kie-tools"
env:
WEBPACK__minimize: "true"
WEBPACK__tsLoaderTranspileOnly: "false"
CHROME_EXTENSION__routerTargetOrigin: "https://kiegroup.github.io"
CHROME_EXTENSION__routerRelativePath: "kogito-online/dev/editors/"
SWF_CHROME_EXTENSION__routerTargetOrigin: "https://kiegroup.github.io"
SWF_CHROME_EXTENSION__routerRelativePath: "kogito-online/dev/editors/"
ONLINE_EDITOR__kieSandboxExtendedServicesDownloadUrlLinux: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_linux_${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}.tar.gz"
ONLINE_EDITOR__kieSandboxExtendedServicesDownloadUrlMacOs: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_macos_${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}.dmg"
ONLINE_EDITOR__kieSandboxExtendedServicesDownloadUrlWindows: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}/kie_sandbox_extended_services_windows_${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}.exe"
ONLINE_EDITOR__kieSandboxExtendedServicesCompatibleVersion: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES_VERSION }}"
ONLINE_EDITOR__buildInfo: "${{ steps.version.outputs.version }} (daily-dev) @ ${{ github.sha }}"
DISPLAY: ":99.0"
SERVERLESS_LOGIC_WEB_TOOLS__kieSandboxExtendedServicesDownloadUrlLinux: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}/kie_sandbox_extended_services_linux_${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}.tar.gz"
SERVERLESS_LOGIC_WEB_TOOLS__kieSandboxExtendedServicesDownloadUrlMacOs: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}/kie_sandbox_extended_services_macos_${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}.dmg"
SERVERLESS_LOGIC_WEB_TOOLS__kieSandboxExtendedServicesDownloadUrlWindows: "https://github.com/kiegroup/kie-tools/releases/download/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}/kie_sandbox_extended_services_windows_${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}.exe"
SERVERLESS_LOGIC_WEB_TOOLS__kieSandboxExtendedServicesCompatibleVersion: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__extendedServicesVersion }}"
SERVERLESS_LOGIC_WEB_TOOLS__buildInfo: "${{ steps.version.outputs.version }} (daily-dev) @ ${{ github.sha }}"
run: |
cd kie-tools
pnpm -r build:prod
- name: "Push dmn-dev-deployment-base-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.DMN_DEV_DEPLOYMENT__baseImageName }}"
tags: "${{ env.DMN_DEV_DEPLOYMENT__baseImageBuildTags }}"
registry: "${{ env.DMN_DEV_DEPLOYMENT__baseImageRegistry }}/${{ env.DMN_DEV_DEPLOYMENT__baseImageAccount }}"
username: "${{ env.DMN_DEV_DEPLOYMENT__baseImageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push kie-sandbox-extended-services-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageName }}"
tags: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageBuildTags }}"
registry: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageRegistry }}/${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageAccount }}"
username: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push git-cors-proxy-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.GIT_CORS_PROXY__imageName }}"
tags: "${{ env.GIT_CORS_PROXY__imageBuildTags }}"
registry: "${{ env.GIT_CORS_PROXY__imageRegistry }}/${{ env.GIT_CORS_PROXY__imageAccount }}"
username: "${{ env.GIT_CORS_PROXY__imageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push kie-sandbox-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.KIE_SANDBOX__imageName }}"
tags: "${{ env.KIE_SANDBOX__imageBuildTags }}"
registry: "${{ env.KIE_SANDBOX__imageRegistry }}/${{ env.KIE_SANDBOX__imageAccount }}"
username: "${{ env.KIE_SANDBOX__imageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push serverless-logic-web-tools-swf-builder-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName }}"
tags: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageBuildTags }}"
registry: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry }}/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount }}"
username: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push serverless-logic-web-tools-base-builder-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName }}"
tags: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageBuildTags }}"
registry: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry }}/${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount }}"
username: "${{ env.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Push dashbuilder-viewer-image to quay.io (Ubuntu only)"
if: runner.os == 'Linux'
uses: redhat-actions/push-to-registry@v2
with:
image: "${{ env.DASHBUILDER__viewerImageName }}"
tags: "${{ env.DASHBUILDER__viewerImageBuildTags }}"
registry: "${{ env.DASHBUILDER__viewerImageRegistry }}/${{ env.DASHBUILDER__viewerImageAccount }}"
username: "${{ env.DASHBUILDER__viewerImageAccount }}"
password: "${{ secrets.QUAY_REGISTRY_PASSWORD }}"
- name: "Deploy kie-sandbox-extended-services-image to OpenShift (Ubuntu only)"
id: deploy_kie_sandbox_extended_services_image
if: runner.os == 'Linux'
uses: ./kie-tools/.github/actions/deploy-openshift
with:
image_tag: ${{ env.DEPLOY_TAG }}
image_url: "${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageRegistry }}/${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageAccount }}/${{ env.KIE_SANDBOX_EXTENDED_SERVICES__imageName }}:${{ env.DEPLOY_TAG }}"
app_name: "daily-dev-kie-sandbox-extended-services"
part_of: ${{ env.OPENSHIFT_PART_OF }}
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
openshift_namespace: ${{ env.OPENSHIFT_NAMESPACE }}
deployment_icon: "golang"
- name: "Deploy git-cors-proxy-image to OpenShift (Ubuntu only)"
id: deploy_git_cors_proxy_image
if: runner.os == 'Linux'
uses: ./kie-tools/.github/actions/deploy-openshift
with:
image_tag: ${{ env.DEPLOY_TAG }}
image_url: "${{ env.GIT_CORS_PROXY__imageRegistry }}/${{ env.GIT_CORS_PROXY__imageAccount }}/${{ env.GIT_CORS_PROXY__imageName }}:${{ env.DEPLOY_TAG }}"
app_name: "daily-dev-git-cors-proxy"
part_of: ${{ env.OPENSHIFT_PART_OF }}
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
openshift_namespace: ${{ env.OPENSHIFT_NAMESPACE }}
deployment_icon: "nodejs"
- name: "Prepare environment variables for OpenShift deployment (Ubuntu only)"
if: runner.os == 'Linux'
shell: bash
run: |
echo "KIE_SANDBOX_EXTENDED_SERVICES_URL=${{ steps.deploy_kie_sandbox_extended_services_image.outputs.route_url }}" >> deployment.env
echo "KIE_SANDBOX_GIT_CORS_PROXY_URL=${{ steps.deploy_git_cors_proxy_image.outputs.route_url }}" >> deployment.env
- name: "Deploy kie-sandbox-image to OpenShift (Ubuntu only)"
if: runner.os == 'Linux'
uses: ./kie-tools/.github/actions/deploy-openshift
with:
image_tag: ${{ env.DEPLOY_TAG }}
image_url: "${{ env.KIE_SANDBOX__imageRegistry }}/${{ env.KIE_SANDBOX__imageAccount }}/${{ env.KIE_SANDBOX__imageName }}:${{ env.DEPLOY_TAG }}"
app_name: "daily-dev-kie-sandbox"
part_of: ${{ env.OPENSHIFT_PART_OF }}
openshift_server: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
openshift_namespace: ${{ env.OPENSHIFT_NAMESPACE }}
deployment_envvars_file_path: ./deployment.env
deployment_icon: "js"
- name: "Upload Serverless Workflow VS Code Extension - Red Hat (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: vscode-extension-serverless-workflow-editor
path: kie-tools/packages/vscode-extension-serverless-workflow-editor/dist/vscode_extension_serverless_workflow_editor_${{ steps.version.outputs.version }}.vsix
- name: "Upload Serverless Workflow VS Code Extension - KIE (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: serverless-workflow-vscode-extension
path: kie-tools/packages/serverless-workflow-vscode-extension/dist/serverless_workflow_vscode_extension_${{ steps.version.outputs.version }}.vsix
- name: "Upload Dashbuilder VS Code Extension (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: vscode-extension-dashbuilder-editor
path: kie-tools/packages/vscode-extension-dashbuilder-editor/dist/vscode_extension_dashbuilder_editor_${{ steps.version.outputs.version }}.vsix
- name: "Upload VS Code Extension (dev) (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: vscode-extension
path: kie-tools/packages/kie-editors-dev-vscode-extension/dist/kie_editors_dev_vscode_extension_${{ steps.version.outputs.version }}.vsix
- name: "Upload Chrome Extension for KIE Editors (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: chrome-extension
path: kie-tools/packages/chrome-extension-pack-kogito-kie-editors/dist/chrome_extension_kogito_kie_editors_${{ steps.version.outputs.version }}.zip
- name: "Upload Chrome Extension for Serverless Workflow Editor (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: swf-chrome-extension
path: kie-tools/packages/chrome-extension-serverless-workflow-editor/dist/chrome_extension_serverless_workflow_editor_${{ steps.version.outputs.version }}.zip
- name: "Checkout kogito-online (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/checkout@v3
with:
token: ${{ secrets.KIE_TOOLS_BOT_TOKEN }}
path: kogito-online
repository: kiegroup/kogito-online
ref: gh-pages
- name: "Update kogito-online resources (Ubuntu only)"
if: runner.os == 'Linux'
run: |
cd kogito-online
rm -rf dev
mkdir -p dev/editors
cp -RL ../kie-tools/packages/stunner-editors/dist/dmn dev/editors/
cp -RL ../kie-tools/packages/stunner-editors/dist/bpmn dev/editors/
cp -RL ../kie-tools/packages/stunner-editors/dist/scesim dev/editors/
cp -r ../kie-tools/packages/online-editor/dist/* dev/
rm -rf dev/gwt-editors
ln -s editors dev/gwt-editors
git config --global user.email "[email protected]"
git config --global user.name "KIE Tools Bot (kiegroup)"
today=$(date -I)
git add . && git commit -m "KIE Tools Daily Dev Build resources - $today" || echo "No changes."
git push origin gh-pages
cd -
- name: "Checkout serverless-logic-sandbox-deployment (Ubuntu only)"
if: runner.os == 'Linux'
uses: actions/checkout@v3
with:
token: ${{ secrets.KIE_TOOLS_BOT_TOKEN }}
path: serverless-logic-sandbox-deployment
repository: kiegroup/serverless-logic-sandbox-deployment
ref: gh-pages
- name: "Update serverless-logic-sandbox-deployment resources (Ubuntu only)"
if: runner.os == 'Linux'
run: |
cd serverless-logic-sandbox-deployment
rm -rf dev
mkdir dev
cp -r ../kie-tools/packages/serverless-logic-web-tools/dist/* dev/
git config --global user.email "[email protected]"
git config --global user.name "KIE Tools Bot (kiegroup)"
today=$(date -I)
git add . && git commit -m "KIE Tools Daily Dev Build resources - $today" || echo "No changes."
git push origin gh-pages
cd -