forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkubeflow-pipelines.yaml
272 lines (238 loc) · 9.25 KB
/
kubeflow-pipelines.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
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
package:
name: kubeflow-pipelines
version: 2.3.0
epoch: 2
description: Machine Learning Pipelines for Kubeflow
checks:
disabled:
- empty
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- argo-cd
- build-base
- busybox
- ca-certificates-bundle
- eslint
- git
- go
- go-licenses
- jq
- kubectl
- nodejs
- npm
- openssf-compiler-options
- py3-gpep517
- py3-pip
- py3-setuptools
- py3-urllib3
- py3-wheel
- python3-dev
data:
- name: backends-go-builds
items:
apiserver: apiserver;apiserver
persistence_agent: persistence_agent;agent/persistence
cache_server: cache_server;cache
scheduledworkflow: swf;crd/controller/scheduledworkflow
viewer-crd-controller: viewer;crd/controller/viewer
pipeline:
- uses: git-checkout
with:
repository: https://github.com/kubeflow/pipelines
tag: ${{package.version}}
expected-commit: 4467df5f9c8242d389f20214f75fecfc4119e8cd
- uses: patch
with:
patches: py-backend-cves.patch
- runs: |
go mod edit -dropreplace=k8s.io/kubernetes
- uses: go/bump
with:
deps: google.golang.org/[email protected] github.com/golang/[email protected] golang.org/x/[email protected] sigs.k8s.io/[email protected] k8s.io/[email protected]
replaces: k8s.io/api=k8s.io/[email protected] k8s.io/apimachinery=k8s.io/[email protected] k8s.io/client-go=k8s.io/[email protected] k8s.io/code-generator=k8s.io/[email protected]
- uses: patch
with:
patches: k8s-method-signature.patch
- uses: patch
with:
patches: bump_requirements.patch
- uses: patch
with:
patches: add-samples.patch
# ERROR: No matching distribution found for kfp==2.0.1
- uses: patch
with:
patches: kfp.patch
- uses: patch
with:
patches: upgrade-urllib3.patch
- uses: patch
with:
patches: upgrade-urllib3-for-backend.patch
- uses: patch
with:
patches: add-overrides.patch
subpackages:
- range: backends-go-builds
name: "kubeflow-pipelines-${{range.key}}"
description: "Kubeflow Pipelines ${{range.key}}"
pipeline:
- runs: |
cd backend
mkdir -p ${{targets.subpkgdir}}/usr/bin
mkdir -p ${{targets.subpkgdir}}/third_party
name=$(echo "${{range.value}}" | cut -d ';' -f 1)
path=$(echo "${{range.value}}" | cut -d ';' -f 2-)
make build/$name
install -Dm755 ./build/$name ${{targets.subpkgdir}}/usr/bin/${{range.key}}
go-licenses check ./src/$path
go-licenses csv ./src/$path > ${{targets.subpkgdir}}/third_party/$name.csv
go-licenses save ./src/$path --save_path ${{targets.subpkgdir}}/third_party/NOTICES
if [ "${name}" == "apiserver" ]; then
mkdir -p ${{targets.subpkgdir}}/samples
# Patch GHSA-248v-346w-9cwc
sed -i 's|certifi==2023.7.22|certifi==2024.07.04|g' requirements.txt
# Patch GHSA-jfmj-5v4g-7637
sed -i 's|zipp==3.15.0|zipp==3.19.1|g' requirements.txt
pip3 install --prefer-binary -r requirements.txt --prefix=/usr --root=${{targets.subpkgdir}}
cp -r ../samples/* ${{targets.subpkgdir}}/samples
cp ./src/$path/config/sample_config.json ${{targets.subpkgdir}}/samples/sample_config.json
mkdir -p ${{targets.subpkgdir}}/config
cp -r ./src/$path/config/* ${{targets.subpkgdir}}/config/
export COMMIT_SHA=$(git rev-parse --short HEAD)
sed -E "s#/(blob|tree)/master/#/\1/${COMMIT_SHA}/#g" -i ${{targets.subpkgdir}}/config/sample_config.json
sed -E "s/%252Fmaster/%252F${COMMIT_SHA}/#g" -i ${{targets.subpkgdir}}/config/sample_config.json
fi
- uses: strip
- name: "kubeflow-pipelines-cache-deployer"
description: "Kubeflow Pipelines cache-deployer"
dependencies:
runtime:
- busybox
- bash
- kubectl-latest
- openssl
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/bin
mkdir -p ${{targets.subpkgdir}}/etc/cache-deployer
mkdir -p ${{targets.subpkgdir}}/third_party
install -m755 -D third_party/license.txt ${{targets.subpkgdir}}/third_party/license.txt
install -m755 -D backend/src/cache/deployer/cache-webhook-config.v1.yaml.template ${{targets.subpkgdir}}/etc/cache-deployer/cache-webhook-config.v1.yaml.template
install -m755 -D backend/src/cache/deployer/cache-webhook-config.v1beta1.v1.15.yaml.template ${{targets.subpkgdir}}/etc/cache-deployer/cache-webhook-config.v1beta1.v1.15.yaml.template
install -m755 -D backend/src/cache/deployer/cache-webhook-config.v1beta1.yaml.template ${{targets.subpkgdir}}/etc/cache-deployer/cache-webhook-config.v1beta1.yaml.template
install -m755 -D backend/src/cache/deployer/deploy-cache-service.sh ${{targets.subpkgdir}}/usr/bin/deploy-cache-service.sh
install -m755 -D backend/src/cache/deployer/webhook-create-signed-cert.sh ${{targets.subpkgdir}}/usr/bin/webhook-create-signed-cert.sh
install -m755 -D backend/src/cache/deployer/webhook-patch-ca-bundle.sh ${{targets.subpkgdir}}/usr/bin/webhook-patch-ca-bundle.sh
- name: "kubeflow-pipelines-cache-deployer-compat"
dependencies:
runtime:
- kubeflow-pipelines-cache-deployer
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/kfp/cache/deployer/
ln -s /usr/bin/deploy-cache-service.sh "${{targets.subpkgdir}}"/kfp/cache/deployer/deploy-cache-service.sh
ln -s /usr/bin/webhook-create-signed-cert.sh "${{targets.subpkgdir}}"/kfp/cache/deployer/webhook-create-signed-cert.sh
ln -s /usr/bin/webhook-patch-ca-bundle.sh "${{targets.subpkgdir}}"/kfp/cache/deployer/webhook-patch-ca-bundle.sh
ln -s /etc/cache-deployer/cache-webhook-config.v1.yaml.template "${{targets.subpkgdir}}"/kfp/cache/deployer/cache-webhook-config.v1.yaml.template
ln -s /etc/cache-deployer/cache-webhook-config.v1beta1.v1.15.yaml.template "${{targets.subpkgdir}}"/kfp/cache/deployer/cache-webhook-config.v1beta1.v1.15.yaml.template
ln -s /etc/cache-deployer/cache-webhook-config.v1beta1.yaml.template "${{targets.subpkgdir}}"/kfp/cache/deployer/cache-webhook-config.v1beta1.yaml.template
- name: "kubeflow-pipelines-frontend"
description: "Kubeflow Pipelines frontend"
dependencies:
runtime:
- nodejs
- wget
pipeline:
- uses: patch
with:
patches: GHSA-952p-6rrq-rcjv.patch
- runs: |
mkdir -p ${{targets.subpkgdir}}/server
mkdir -p ${{targets.subpkgdir}}/client
cd frontend/
# Update package lock in server
cd server/
npm i
npm audit fix --package-lock-only --legacy-peer-deps || true
cd ../
# Build frontend
npm ci --legacy-peer-deps
npm run postinstall
npm run build
# Copy to output
cp -r ./build/* ${{targets.subpkgdir}}/client/
# Build server
cd ./server
npm ci
npm run build
# Remove dev dependencies
rm -rf ./node_modules
npm ci --production
# Copy to output
mv ./* ${{targets.subpkgdir}}/server/
- name: "kubeflow-pipelines-metadata-writer"
description: "Kubeflow Pipelines metadata_writer"
dependencies:
runtime:
- python3
- py3-absl-py
- py3-attrs
- py3-cachetools
- py3-certifi
- py3-charset-normalizer
- py3-google-auth
- py3-grpcio
- py3-idna
- py3-kubernetes
- py3-lru-dict
- py3-ml-metadata
- py3-oauthlib
- py3-protobuf
- py3-pyasn1-modules
- py3-pyasn1
- py3-dateutil
- py3-pyyaml
- py3-requests-oauthlib
- py3-requests
- py3-rsa
- py3-six
- py3-urllib3
- py3-websocket-client
pipeline:
- runs: |
cd backend/metadata_writer
python3 -m gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
python3 -m installer -d "${{targets.subpkgdir}}" \
dist/*.whl
find ${{targets.subpkgdir}} -name "*.pyc" -exec rm -rf '{}' +
- name: "kubeflow-pipelines-metadata-writer-compat"
description: "Kubeflow Pipelines Metadata Writer"
dependencies:
runtime:
- kubeflow-pipelines-metadata-writer
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/kfp/metadata_writer
_py3ver=$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
ln -s /usr/lib/python"$_py3ver"/site-packages/metadata_writer.py "${{targets.subpkgdir}}"/kfp/metadata_writer/
- name: kubeflow-pipelines-metadata-envoy-config
description: Kubeflow Pipelines Metadata-Envoy Config
dependencies:
replaces:
- envoy-config
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/etc/envoy/
cp metadata-envoy-config.yaml ${{targets.subpkgdir}}/etc/envoy/metadata-envoy.yaml
update:
enabled: true
ignore-regex-patterns:
- 'sdk-'
github:
identifier: kubeflow/pipelines