Files
minimal-setups/deployment/deploy.sh
Wolfgang Hottgenroth 79ad5900d8
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
changes 3
2025-12-19 10:43:39 +01:00

29 lines
480 B
Bash
Executable File

#!/bin/bash
set -ex
if [ "$IMAGE_TAG" == "" ]; then
echo "Make sure IMAGE_TAG is set"
exit 1
fi
IMAGE_NAME=gitea.hottis.de/wn/minimal-setups
NAMESPACE=homepages
DEPLOYMENT_DIR=$PWD/deployment
pushd $DEPLOYMENT_DIR > /dev/null
kubectl create namespace $NAMESPACE \
--dry-run=client \
-o yaml | \
kubectl -f - apply
cat $DEPLOYMENT_DIR/deploy-yml.tmpl | \
sed -e 's,%IMAGE%,'$IMAGE_NAME':'$IMAGE_TAG','g | \
kubectl apply -f - -n $NAMESPACE
popd > /dev/null