fix linting errors

Signed-off-by: Sam Alba <sam.alba@gmail.com>
This commit is contained in:
Sam Alba 2021-03-24 09:36:19 -07:00
parent a3513ed479
commit ca613ea50b
3 changed files with 38 additions and 38 deletions

View File

@ -16,7 +16,7 @@ test:
.PHONY: cuefmt .PHONY: cuefmt
cuefmt: cuefmt:
@(cue fmt -s ./stdlib/...) @(cue fmt -s ./stdlib/...)
@(cue fmt -s ./examples/*) @(cue fmt -s ./examples/*/)
@(cue fmt -s ./tests/...) @(cue fmt -s ./tests/...)
.PHONY: lint .PHONY: lint

View File

@ -46,8 +46,8 @@ kubeApply: kubernetes.#Apply & {
// Fill using: // Fill using:
// --input-dir helmChart.chart=./testdata/mychart // --input-dir helmChart.chart=./testdata/mychart
helmChart: helm.#Chart & { helmChart: helm.#Chart & {
name: "test-helm" name: "test-helm"
namespace: "test" namespace: "test"
kubeconfig: cluster.kubeconfig kubeconfig: cluster.kubeconfig
chart: dagger.#Artifact chart: dagger.#Artifact
} }

View File

@ -1,41 +1,41 @@
package helm package helm
#code: #""" #code: #"""
# Add the repository # Add the repository
helm repo add repository "${HELM_REPO}" helm repo add repository "${HELM_REPO}"
helm repo update helm repo update
# If the chart is a file, then it's the chart name # If the chart is a file, then it's the chart name
# If it's a directly, then it's the contents of the cart # If it's a directly, then it's the contents of the cart
if [ -f "/helm/chart" ]; then if [ -f "/helm/chart" ]; then
HELM_CHART="repository/$(cat /helm/chart)" HELM_CHART="repository/$(cat /helm/chart)"
else else
HELM_CHART="/helm/chart" HELM_CHART="/helm/chart"
fi fi
OPTS="" OPTS=""
OPTS="$OPTS --timeout "$HELM_TIMEOUT"" OPTS="$OPTS --timeout "$HELM_TIMEOUT""
OPTS="$OPTS --namespace "$KUBE_NAMESPACE"" OPTS="$OPTS --namespace "$KUBE_NAMESPACE""
[ "$HELM_WAIT" = "true" ] && OPTS="$OPTS --wait" [ "$HELM_WAIT" = "true" ] && OPTS="$OPTS --wait"
[ "$HELM_ATOMIC" = "true" ] && OPTS="$OPTS --atomic" [ "$HELM_ATOMIC" = "true" ] && OPTS="$OPTS --atomic"
[ -f "/helm/values.yaml" ] && OPTS="$OPTS -f /helm/values.yaml" [ -f "/helm/values.yaml" ] && OPTS="$OPTS -f /helm/values.yaml"
# Select the namespace # Select the namespace
kubectl create namespace "$KUBE_NAMESPACE" || true kubectl create namespace "$KUBE_NAMESPACE" || true
case "$HELM_ACTION" in case "$HELM_ACTION" in
install) install)
helm install $OPTS "$HELM_NAME" "$HELM_CHART" helm install $OPTS "$HELM_NAME" "$HELM_CHART"
;; ;;
upgrade) upgrade)
helm upgrade $OPTS "$HELM_NAME" "$HELM_CHART" helm upgrade $OPTS "$HELM_NAME" "$HELM_CHART"
;; ;;
installOrUpgrade) installOrUpgrade)
helm upgrade $OPTS --install "$HELM_NAME" "$HELM_CHART" helm upgrade $OPTS --install "$HELM_NAME" "$HELM_CHART"
;; ;;
*) *)
echo unsupported helm action "$HELM_ACTION" echo unsupported helm action "$HELM_ACTION"
exit 1 exit 1
;; ;;
esac esac
"""# """#