Skip to content

Commit

Permalink
Merge pull request #147 from openstad/fix/bind-deployment-to-publishe…
Browse files Browse the repository at this point in the history
…d-chart

fix: bind deployment scripts (except local) to published chart
  • Loading branch information
Badmuts authored Jan 24, 2024
2 parents 6d09149 + c27e041 commit 9907f39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
14 changes: 3 additions & 11 deletions operations/deployments/openstad-headless/deploy-acc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
################################################################################
# repo
################################################################################
# helm repo add openstad-headless https://raw.githubusercontent.com/openstad/openstad-headless/master
helm repo add openstad-headless https://raw.githubusercontent.com/openstad/openstad-headless/gh-pages
helm repo update > /dev/null

################################################################################
Expand All @@ -18,8 +18,7 @@ images="$ROOT_DIR/operations/deployments/openstad-headless/environments/acc/imag
chart_dir="$ROOT_DIR/charts"

STACK="openstad-headless"
# CHART="openstad-headless/openstad-headless"
CHART="openstad-headless"
CHART="openstad-headless/openstad-headless"
CHART_VERSION="0.0.1"
NAMESPACE="headless-acc-2024"
CONTEXT="do-ams3-openstad-ams-acc"
Expand All @@ -32,20 +31,13 @@ echo "Decrypting files..."
sh $ROOT_DIR/operations/scripts/decrypt.sh

echo "Starting deployment..."
# Temp for local chart testing
current_folder=$(pwd)
cd $chart_dir
# end temp
helm upgrade "$STACK" "$CHART" \
--create-namespace \
--install \
--version "$CHART_VERSION" \
--namespace "$NAMESPACE" \
-f "$values" \
-f "$secrets" \
-f "$images"
# Temp for local chart testing
# --version "$CHART_VERSION"
cd $current_folder
# end temp

kubectl config set current-context $PREVIOUS_CONTEXT
10 changes: 7 additions & 3 deletions operations/deployments/openstad-headless/deploy-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,20 @@ echo "Decrypting files..."
sh $ROOT_DIR/operations/scripts/decrypt.sh

echo "Starting deployment..."
# Temp for local chart testing
current_folder=$(pwd)
cd $chart_dir
helm template "$STACK" "$CHART" \
--atomic \
# end temp
helm upgrade "$STACK" "$CHART" \
--create-namespace \
--install \
--namespace "$NAMESPACE" \
-f "$values" \
-f "$secrets" \
-f "$images"
# Temp for local chart testing
# --version "$CHART_VERSION"

cd $current_folder
# end temp

kubectl config set current-context $PREVIOUS_CONTEXT

0 comments on commit 9907f39

Please sign in to comment.