/
Dockerfile.template
62 lines (56 loc) · 2.31 KB
/
Dockerfile.template
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
#syntax=docker/dockerfile:1.6.0
FROM ghcr.io/uniget-org/tools/helm:latest AS helm
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
COPY --link --from=helm / /
RUN <<EOF
echo "export HELM_PLUGINS=/share/helm/plugins" >"${prefix}/etc/profile.d/helm-plugins.sh"
export HELM_PLUGINS=${prefix}/share/helm/plugins
plugins=(
https://github.com/mstrzele/helm-edit
https://github.com/databus23/helm-diff
https://github.com/aslafy-z/helm-git
https://github.com/sstarcher/helm-release
https://github.com/maorfr/helm-backup
https://github.com/technosophos/helm-keybase
https://github.com/technosophos/helm-gpg
https://github.com/cloudogu/helm-sudo
https://github.com/bloodorangeio/helm-oci-mirror
https://github.com/UniKnow/helm-outdated
https://github.com/rimusz/helm-chartify
https://github.com/random-dwi/helm-doc
https://github.com/sapcc/helm-outdated-dependencies
https://github.com/jkroepke/helm-secrets
https://github.com/sigstore/helm-sigstore
https://github.com/quintush/helm-unittest
https://github.com/komodorio/helm-dashboard
)
for url in "${plugins[@]}"; do
name="$(basename "${url}")"
echo "Installing ${name}"
helm plugin install "${url}"
echo "Cleaning ${name}"
rm -rf \
"${HELM_PLUGINS}/${name}/.git" \
"${HELM_PLUGINS}/${name}/.github" \
"${HELM_PLUGINS}/${name}/cmd" \
"${HELM_PLUGINS}/${name}/pkg" \
"${HELM_PLUGINS}/${name}/scripts" \
"${HELM_PLUGINS}/${name}/test" \
"${HELM_PLUGINS}/${name}/vendor" \
"${HELM_PLUGINS}/${name}/.[a-z]*" \
"${HELM_PLUGINS}/${name}/*.go" \
"${HELM_PLUGINS}/${name}/*.md"
done
helm diff completion bash >"${prefix}/share/bash-completion/completions/helm-diff"
helm diff completion fish >"${prefix}/share/fish/vendor_completions.d/helm-diff.fish"
helm diff completion zsh >"${prefix}/share/zsh/vendor-completions/_helm-diff"
helm sigstore completion bash >"${prefix}/share/bash-completion/completions/helm-sigstore"
helm sigstore completion fish >"${prefix}/share/fish/vendor_completions.d/helm-sigstore.fish"
helm sigstore completion zsh >"${prefix}/share/zsh/vendor-completions/_helm-sigstore"
EOF