deployment
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
2024-12-02 09:42:12 +01:00
parent defee32084
commit 04b0218280
9 changed files with 114 additions and 3 deletions

29
deployment/deploy.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
ARG1=$1
NAMESPACE=`cat namespace`
IMAGE_NAME=$FORGE_NAME/$CI_REPO
DEPLOYMENT_DIR=$PWD/deployment
pushd $DEPLOYMENT_DIR > /dev/null
./roll-db-credential.sh
kubectl create configmap ma-conf \
--from-literal=MA_CONF="`cat config.json`" \
--dry-run=client \
--o yaml \
--save-config | \
kubectl apply -f - -n $NAMESPACE
cat deploy-yml.tmpl | \
sed -e 's,%IMAGE%,'$IMAGE_NAME':'$IMAGE_TAG','g | \
kubectl apply -f - -n $NAMESPACE
popd /dev/null