stdlib: helm: fixed typo + moved helm install to own exec to optimize caching
Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
parent
17ddf60bfc
commit
a3513ed479
@ -1,12 +1,6 @@
|
|||||||
package helm
|
package helm
|
||||||
|
|
||||||
#code: #"""
|
#code: #"""
|
||||||
# Install Helm
|
|
||||||
curl -sfL -S https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | \
|
|
||||||
tar -zx -C /tmp && \
|
|
||||||
mv /tmp/linux-amd64/helm /usr/local/bin && \
|
|
||||||
chmod +x /usr/local/bin/helm
|
|
||||||
|
|
||||||
# Add the repository
|
# Add the repository
|
||||||
helm repo add repository "${HELM_REPO}"
|
helm repo add repository "${HELM_REPO}"
|
||||||
helm repo update
|
helm repo update
|
||||||
|
@ -56,6 +56,24 @@ import (
|
|||||||
version: kubectlVersion
|
version: kubectlVersion
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
llb.#Exec & {
|
||||||
|
env: HELM_VERSION: version
|
||||||
|
args: [
|
||||||
|
"/bin/bash",
|
||||||
|
"--noprofile",
|
||||||
|
"--norc",
|
||||||
|
"-eo",
|
||||||
|
"pipefail",
|
||||||
|
"-c",
|
||||||
|
#"""
|
||||||
|
# Install Yarn
|
||||||
|
curl -sfL -S https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | \
|
||||||
|
tar -zx -C /tmp && \
|
||||||
|
mv /tmp/linux-amd64/helm /usr/local/bin && \
|
||||||
|
chmod +x /usr/local/bin/helm
|
||||||
|
"""#,
|
||||||
|
]
|
||||||
|
},
|
||||||
llb.#Mkdir & {
|
llb.#Mkdir & {
|
||||||
path: "/helm"
|
path: "/helm"
|
||||||
},
|
},
|
||||||
@ -88,7 +106,6 @@ import (
|
|||||||
KUBECONFIG: "/kubeconfig"
|
KUBECONFIG: "/kubeconfig"
|
||||||
KUBE_NAMESPACE: namespace
|
KUBE_NAMESPACE: namespace
|
||||||
|
|
||||||
HELM_VERSION: version
|
|
||||||
HELM_REPO: repository
|
HELM_REPO: repository
|
||||||
HELM_NAME: name
|
HELM_NAME: name
|
||||||
HELM_ACTION: action
|
HELM_ACTION: action
|
||||||
@ -98,7 +115,7 @@ import (
|
|||||||
}
|
}
|
||||||
mount: {
|
mount: {
|
||||||
if (values & string) != _|_ {
|
if (values & string) != _|_ {
|
||||||
"/helm/varlues.yaml": values
|
"/helm/values.yaml": values
|
||||||
}
|
}
|
||||||
if (chart & dagger.#Artifact) != _|_ {
|
if (chart & dagger.#Artifact) != _|_ {
|
||||||
"/helm/chart": from: chart
|
"/helm/chart": from: chart
|
||||||
|
Reference in New Issue
Block a user