-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubeflow-centraldashboard.yaml
116 lines (105 loc) · 3.13 KB
/
kubeflow-centraldashboard.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
package:
name: kubeflow-centraldashboard
version: 1.9.2
epoch: 0
description: Landing page and central dashboard for Kubeflow deployments
copyright:
- license: MIT
dependencies:
runtime:
- npm
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- git
- jq
- nodejs-18
- npm
- openssl
- wolfi-base
pipeline:
- uses: git-checkout
with:
repository: https://github.com/kubeflow/kubeflow
tag: v${{package.version}}
expected-commit: 315ee7e305e8b7485c975283fb7e5751d21f267d
- working-directory: components/centraldashboard
runs: |
# Create "overrides" section of package.json
jq '.overrides |= (if . then . else {} end)' package.json > temp.json && mv temp.json package.json
# Define the overrides
overrides='{
"ajv": "^6.12.3",
"node-fetch": "^2.6.7",
"node-forge": "^1.3.0",
"axios": "^1.6.0",
"qs": "^6.7.3",
"underscore": "^1.12.1",
"minimatch": "^3.0.5",
"path-parse": "^1.0.7",
"word-wrap": "^1.2.4",
"protobufjs": "^6.11.4",
"request": "^2.88.0",
"monorepo-symlink-test": "^0.0.0",
"tough-cookie": "^4.1.3",
"ws": "^8.17.1",
"follow-redirects": "^1.15.6",
"express": "^4.20.0",
"@grpc/grpc-js": "^1.10.9",
"path-to-regexp": "0.1.10",
"serve-static": "^1.16.0",
"cookie": "0.7.0",
"jsonpath-plus": "10.0.0"
}'
# Apply the overrides
jq --argjson overrides "$overrides" '.overrides += $overrides' package.json > temp.json && mv temp.json package.json
# Define the dependencies
dependencies='{
"express": "^4.20.0",
"@grpc/grpc-js": "^1.10.9"
}'
# Apply the dependencies
jq --argjson dependencies "$dependencies" '.dependencies += $dependencies' package.json > temp.json && mv temp.json package.json
- working-directory: components/centraldashboard
runs: |
export NODE_OPTIONS=--openssl-legacy-provider
# Build the frontend and copy the common package into it
npm rebuild && \
npm install --force --legacy-peer-deps && \
npm run build --force --legacy-peer-deps && \
npm prune --production --force --legacy-peer-deps
# Now move it all into place
mkdir -p "${{targets.destdir}}/app"
mv * "${{targets.destdir}}/app"
test:
environment:
contents:
packages:
- nodejs
- npm
pipeline:
- runs: |
cd /app
# Start the server in the background and redirect output to a log file
npm start > server.log 2>&1 &
SERVER_PID=$!
sleep 5
# Check the log file for the expected output
if ! grep -q 'Server listening on port' server.log; then
echo "Error: Server did not start correctly"
cat server.log
kill $SERVER_PID
exit 1
fi
kill $SERVER_PID
update:
enabled: true
github:
identifier: kubeflow/kubeflow
use-tag: true
# There were some malformed early tags
tag-filter: v1
strip-prefix: v