add deployment
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
2025-07-30 17:46:04 +02:00
parent 57e9940b3a
commit c31679632b
3 changed files with 95 additions and 2 deletions

23
deployment/deploy.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
if [ "$IMAGE_TAG" == "" ]; then
echo "Make sure IMAGE_TAG is set"
exit 1
fi
IMAGE_NAME=gitea.hottis.de/wn/dtrack-defectdojo-automation-server
NAMESPACE=webservices
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