-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdev.k8slens.OpenLens.yml
328 lines (304 loc) · 13 KB
/
dev.k8slens.OpenLens.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
app-id: dev.k8slens.OpenLens
runtime: org.freedesktop.Platform
runtime-version: '22.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '22.08'
sdk-extensions:
# Node.js version: https://github.com/lensapp/lens/blob/master/.github/workflows/publish-release-npm.yml#L20
- org.freedesktop.Sdk.Extension.node16
command: open-lens
finish-args:
- --device=dri
- --share=ipc
- --share=network
- --socket=wayland
- --socket=fallback-x11
- --socket=ssh-auth
- --talk-name=org.freedesktop.Notifications
- --system-talk-name=org.freedesktop.login1
# We use .kube/config to know what clusters/contexts are set up
- --filesystem=~/.kube/config
# It's common to run minikube for experimenting
- --filesystem=~/.minikube
# cloud providers config/creds
- --filesystem=~/.aws
- --filesystem=~/.config/gcloud
- --persist=.k8slens
modules:
- shared-modules/libsecret/libsecret.json
- name: libvips
buildsystem: meson
builddir: true
cleanup:
- '*'
sources:
- type: archive
url: https://github.com/libvips/libvips/archive/refs/tags/v8.16.0.tar.gz
sha256: d28d7bf7e3f8fa17390c255ace4a05a1c56459e1f6015319f4847ea0733593b3
x-checker-data:
type: anitya
project-id: 5097
url-template: https://github.com/libvips/libvips/archive/refs/tags/v$version.tar.gz
- name: kubelogin
buildsystem: simple
build-commands:
- install -Dm755 kubelogin "${FLATPAK_DEST}/bin/kubelogin"
sources:
- type: archive
strip-components: 2
only-arches:
- x86_64
url: https://github.com/Azure/kubelogin/releases/download/v0.1.4/kubelogin-linux-amd64.zip
sha256: cda67158030669963f19abe7c47edbc941d842d18790c599e444998cbab6aae7
x-checker-data:
type: anitya
project-id: 341508
url-template: https://github.com/Azure/kubelogin/releases/download/v$version/kubelogin-linux-amd64.zip
- type: archive
strip-components: 2
only-arches:
- aarch64
url: https://github.com/Azure/kubelogin/releases/download/v0.1.4/kubelogin-linux-arm64.zip
sha256: e66463b0ef2ec18af23daffd61c709d9c2cf16323e8e0c193270d2f281dd5825
x-checker-data:
type: anitya
project-id: 341508
url-template: https://github.com/Azure/kubelogin/releases/download/v$version/kubelogin-linux-arm64.zip
- name: aws-cli
buildsystem: simple
build-commands:
- ./install -i "${FLATPAK_DEST}/aws-cli" -b "${FLATPAK_DEST}/bin"
sources:
- type: archive
only-arches:
- x86_64
url: https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
sha256: 90d06c744f692418a37a910b265cc4d0cfed1352a6221a207d56cf28d23e2679
x-checker-data:
type: rotating-url
url: https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
- type: archive
only-arches:
- aarch64
url: https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip
sha256: 9bc8f5631d9682af25710553ece7dc63d02aa70216403ddf6cd1348e476ee9b2
x-checker-data:
type: rotating-url
url: https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip
- name: google-cloud-cli
buildsystem: simple
build-options:
arch:
x86_64:
env:
ARCH: x86_64
aarch64:
env:
ARCH: arm
build-commands:
- mv google-cloud-cli "${FLATPAK_DEST}/google-cloud-cli"
- ln -sf "${FLATPAK_DEST}/google-cloud-cli/bin/gcloud" "${FLATPAK_DEST}/bin/gcloud"
- |
manifests=(
"gke-gcloud-auth-plugin-linux-${ARCH}.manifest"
"gke-gcloud-auth-plugin-linux-${ARCH}.snapshot.json"
"gke-gcloud-auth-plugin.manifest"
"gke-gcloud-auth-plugin.snapshot.json"
)
for item in ${manifests[@]}; do
install -Dm644 \
"google-cloud-cli-gke-gcloud-auth-plugin/.install/${item}" \
"${FLATPAK_DEST}/google-cloud-cli/.install/${item}"
done
- install -Dm755 google-cloud-cli-gke-gcloud-auth-plugin/bin/gke-gcloud-auth-plugin
"${FLATPAK_DEST}/google-cloud-cli/bin/gke-gcloud-auth-plugin"
- ln -sf "${FLATPAK_DEST}/google-cloud-cli/bin/gke-gcloud-auth-plugin" "${FLATPAK_DEST}/bin/gke-gcloud-auth-plugin"
sources:
- type: archive
dest: google-cloud-cli
only-arches:
- x86_64
url: https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-435.0.1-linux-x86_64.tar.gz
sha256: 98296964ead5e99f98290b60e69826671334a088a38e32cced6dbddace24a204
- type: archive
dest: google-cloud-cli
only-arches:
- aarch64
url: https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-435.0.1-linux-arm.tar.gz
sha256: bd3fadd38c6e157e33064d622b4c8ea116830fab01d8976befb81b89072233a2
- type: archive
dest: google-cloud-cli-gke-gcloud-auth-plugin
only-arches:
- x86_64
url: https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/google-cloud-cli-gke-gcloud-auth-plugin_435.0.1.orig_amd64.tar.gz
sha256: d4563228dc8591e55f4aee054484a9a9b8d178d57571d0d0d653f6d9e5a9abb6
- type: archive
dest: google-cloud-cli-gke-gcloud-auth-plugin
only-arches:
- aarch64
url: https://dl.google.com/dl/cloudsdk/release/downloads/for_packagers/linux/google-cloud-cli-gke-gcloud-auth-plugin_435.0.1.orig_aarch64.tar.gz
sha256: 27e15b9cffbce16018ed2d4f99e5e9cc7a3206f938ed75b30a48a030e6b770ea
- name: open-lens
buildsystem: simple
build-options:
# Add the node bin directory.
append-path: /usr/lib/sdk/node16/bin:/run/build/open-lens/flatpak-node/chromedrive
env:
# Don't add ELECTRON_CACHE
XDG_CACHE_HOME: /run/build/open-lens/flatpak-node/cache
npm_config_offline: 'true'
npm_config_no_save: 'true'
npm_config_cache: /run/build/open-lens/flatpak-node/npm-cache
npm_config_loglevel: verbose
ELECTRON_SKIP_BINARY_DOWNLOAD: 'true'
LENS_SKIP_DOWNLOAD_BINARIES: 'true'
arch:
# https://github.com/sass/node-sass/issues/3033#issuecomment-763180778
# The architecture of Electron, see https://electronjs.org/docs/tutorial/support#supported-platforms
# for supported architectures.
x86_64:
env:
npm_config_arch: x64
npm_config_target_arch: x64
aarch64:
env:
npm_config_arch: arm64
npm_config_target_arch: arm64
build-commands:
- chmod +x open-lens/binaries/client/linux/*/lens-k8s-proxy open-lens/binaries/client/linux/*/kubectl
open-lens/binaries/client/linux/*/helm
- sed -i -e "s/electron-builder --publish onTag/electron-builder --linux dir
--${npm_config_arch} --publish never/" open-lens/package.json
# don't specify npm version
- sed -i -e '/"engines":/{n;d}' package.json
- |
ln -srv "$XDG_CACHE_HOME/node-gyp" "$HOME/.electron-gyp"
npm ci --offline
- |
export KUBECTL_VERSION=$(cat kubectl-version.txt)
ln -srv "$XDG_CACHE_HOME/node-gyp" "$HOME/.electron-gyp"
npm run build
- |
export KUBECTL_VERSION=$(cat kubectl-version.txt)
ln -srv "$XDG_CACHE_HOME/node-gyp" "$HOME/.electron-gyp"
npm run build:app
# Move the resulting, unpacked directory to /app.
- mv open-lens/dist/linux-*unpacked "${FLATPAK_DEST}/open-lens"
- install -Dm644 dev.k8slens.OpenLens.desktop "${FLATPAK_DEST}/share/applications/${FLATPAK_ID}.desktop"
- install -Dm755 open-lens.sh "${FLATPAK_DEST}/bin/open-lens"
- install -Dm644 dev.k8slens.OpenLens.metainfo.xml "${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml"
- install -Dm644 open-lens/build/icons/512x512.png "${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/${FLATPAK_ID}.png"
# To allow separate locales
# https://searchfox.org/mozilla-central/rev/8a4f55bc09ffc5c25dcb4586c51ae4a9fee77b4c/taskcluster/docker/firefox-flatpak/runme.sh#131-133
- |
APP_LOCALES_ROOT="${FLATPAK_DEST}/open-lens/locales"
RUNTIME_LOCALES_ROOT="${FLATPAK_DEST}/share/runtime/locale"
if [ -d "${APP_LOCALES_ROOT}" ]; then
for lang in "${APP_LOCALES_ROOT}"/*.pak; do
LOCALE="$(basename -s .pak "${lang}")"
runtime_locale_dir="${RUNTIME_LOCALES_ROOT}/${LOCALE%%-*}/"
install -Dm644 -t "${runtime_locale_dir}" "${lang}"
ln -sf "${runtime_locale_dir}/$(basename "${lang}")" "${APP_LOCALES_ROOT}/$(basename "${lang}")"
done
fi
sources:
- type: git
url: https://github.com/lensapp/lens.git
tag: v6.5.2
commit: 18e4e9e5dc1e568a9acd9b0cf6692bfc0fb39df8
x-checker-data:
is-main-source: true
type: anitya
project-id: 322370
stable-only: true
tag-template: v$version
- type: patch
path: patches/open-lens/lerna-offline.patch
- type: patch
path: patches/open-lens/read-kubectl-version-from-env.patch
- type: patch
path: patches/open-lens/set-electron-to-version-in-lockfile.patch
- type: file
path: open-lens.sh
- type: file
path: dev.k8slens.OpenLens.metainfo.xml
- type: file
path: dev.k8slens.OpenLens.desktop
- type: file
url: https://storage.googleapis.com/kubernetes-release/release/stable-1.txt
sha256: 696ff09feaa5f95ebc56206a2be17ab6627a26f327977b9b108cf63e1ae33c66
dest-filename: kubectl-version.txt
x-checker-data:
type: rotating-url
url: https://storage.googleapis.com/kubernetes-release/release/stable-1.txt
- type: file
only-arches: [x86_64]
url: https://github.com/lensapp/lens-k8s-proxy/releases/download/v0.3.2/lens-k8s-proxy-linux-amd64
sha256: 965e783290a0d9edcaeea89a6d10f4c03a79792def56f61700c5490b442bc87c
dest: open-lens/binaries/client/linux/x64
dest-filename: lens-k8s-proxy
x-checker-data:
type: anitya
project-id: 322711
stable-only: true
url-template: https://github.com/lensapp/lens-k8s-proxy/releases/download/v$version/lens-k8s-proxy-linux-amd64
- type: file
only-arches: [aarch64]
url: https://github.com/lensapp/lens-k8s-proxy/releases/download/v0.3.2/lens-k8s-proxy-linux-arm64
sha256: 9df1822c52b5ffd043c97e1bef4fd75d11910d8e3e73911a3c32de8274e73bdf
dest: open-lens/binaries/client/linux/arm64
dest-filename: lens-k8s-proxy
x-checker-data:
type: anitya
project-id: 322711
stable-only: true
url-template: https://github.com/lensapp/lens-k8s-proxy/releases/download/v$version/lens-k8s-proxy-linux-arm64
- type: file
only-arches: [x86_64]
url: https://storage.googleapis.com/kubernetes-release/release/v1.31.0/bin/linux/amd64/kubectl
sha256: 7c27adc64a84d1c0cc3dcf7bf4b6e916cc00f3f576a2dbac51b318d926032437
dest: open-lens/binaries/client/linux/x64
dest-filename: kubectl
x-checker-data:
type: anitya
project-id: 10954
stable-only: true
url-template: https://storage.googleapis.com/kubernetes-release/release/v$version/bin/linux/amd64/kubectl
- type: file
only-arches: [aarch64]
url: https://storage.googleapis.com/kubernetes-release/release/v1.31.0/bin/linux/arm64/kubectl
sha256: f42832db7d77897514639c6df38214a6d8ae1262ee34943364ec1ffaee6c009c
dest: open-lens/binaries/client/linux/arm64
dest-filename: kubectl
x-checker-data:
type: anitya
project-id: 10954
stable-only: true
url-template: https://storage.googleapis.com/kubernetes-release/release/v$version/bin/linux/arm64/kubectl
- type: archive
only-arches: [x86_64]
url: https://get.helm.sh/helm-v3.16.2-linux-amd64.tar.gz
sha256: 9318379b847e333460d33d291d4c088156299a26cd93d570a7f5d0c36e50b5bb
dest: open-lens/binaries/client/linux/x64
x-checker-data:
type: anitya
project-id: 15046
stable-only: true
url-template: https://get.helm.sh/helm-v$version-linux-amd64.tar.gz
- type: archive
only-arches: [aarch64]
url: https://get.helm.sh/helm-v3.16.2-linux-arm64.tar.gz
sha256: 1888301aeb7d08a03b6d9f4d2b73dcd09b89c41577e80e3455c113629fc657a4
dest: open-lens/binaries/client/linux/arm64
x-checker-data:
type: anitya
project-id: 15046
stable-only: true
url-template: https://get.helm.sh/helm-v$version-linux-arm64.tar.gz
# Add the flatpak-node-generator generated sources.
# flatpak-node-generator --electron-node-headers --recursive yarn yarn.lock
- generated-sources.json
# npm install --package-lock-only --workspaces --include-workspace-root
- type: file
path: package-lock.json