Skip to content

adding healthcheck to kube #7

adding healthcheck to kube

adding healthcheck to kube #7

name: pull request environment
on:
pull_request:
types: [opened, reopened]
push:
branches: [separateBranch]
jobs:
deploy-to-kubernetes:
runs-on: brycelabel
steps:
- name: check out code
uses: actions/checkout@v4
- name: deploy kubernetes environment
run: |
export PULL_REQUEST_ID=${{ github.event.pull_request.number }}
echo $PULL_REQUEST_ID
kubectl create namespace bryce-pr-$PULL_REQUEST_ID || true
kubectl -n bryce-pr-$PULL_REQUEST_ID delete configmap blazor-web-postgres-init || true
kubectl -n bryce-pr-$PULL_REQUEST_ID create configmap blazor-web-postgres-init --from-file=./TestTicket/20240215.01.21.01.sql
export RUN_SALT="pr-${PULL_REQUEST_ID}-${GITHUB_RUN_ID}"
docker build -t 144.17.92.12:5000/bryce2/blazor-web:RUN_SALT .
docker push 144.17.92.12:5000/bryce2/blazor-web:RUN_SALT .
for file in ./kube-pr/*; do
echo "Applying $file"
cat $file | envsubst | kubectl apply -f -
done