item-atlas/deploy/helm/promote.sh

19 lines
549 B
Bash
Executable File

#!/bin/sh
set -eu
namespace="$1"
test -n "$DRONE_COMMIT_SHA"
test -n "$ATLAS_KUBECONFIG_B64"
umask 077
atlas_kubeconfig=$(mktemp)
trap 'rm -f "$atlas_kubeconfig"' EXIT
printf '%s' "$ATLAS_KUBECONFIG_B64" | base64 -d > "$atlas_kubeconfig"
unset ATLAS_KUBECONFIG_B64
export KUBECONFIG="$atlas_kubeconfig"
helm upgrade --install item-atlas deploy/helm/item-atlas --namespace "$namespace" \
--atomic --wait --timeout 12m --history-max 10 \
--set-string "image.tag=$DRONE_COMMIT_SHA" \
--set 'imagePullSecrets[0].name=item-atlas-registry'