fix/cicd #3

Merged
marcio.fernandes merged 62 commits from fix/cicd into master 2025-11-22 17:43:58 +00:00
2 changed files with 22 additions and 17 deletions
Showing only changes of commit 74dc2068c8 - Show all commits

View File

@@ -44,4 +44,8 @@ runs:
echo "config created - ${GITHUB_TEMP}/.kube/config"
ls -lah ${GITHUB_TEMP}/.kube/config
echo "KUBECONFIG=${GITHUB_TEMP}/.kube/config" >> "${GITHUB_ENV}"
cp -r "${GITHUB_TEMP}/.kube" /root
# curl -vk \
# --cacert ca.crt \
# -H "Authorization: Bearer $KUBE_TOKEN" \
# https://<server>:6443/version

View File

@@ -38,23 +38,24 @@ jobs:
ls -l ${{ gitea.workspace }}
echo "KUBECONFIG: ${KUBECONFIG}"
echo "CASA_VLAN_KUBE_SERVER: ${{ secrets.CASA_VLAN_KUBE_SERVER }}"
- name: Deploy Home Assistant
shell: bash
run: |
set -x
echo "KUBECONFIG=$KUBECONFIG"
kubectl config view
timeout 10s kubectl get pods --request-timeout=10s
# - name: Deploy Home Assistant
# shell: bash
# run: |
# set -e
# cd ${{ gitea.workspace }}
# export ENDPOINT_IP="${{ secrets.ENDPOINT_IP }}"
# export SERVICE_PORT=${{ secrets.SERVICE_PORT }}
# export INGRESS_ROUTES_MATCH="${{ secrets.INGRESS_ROUTES_MATCH }}"
# export INGRESS_TLS_SECRET_NAME=${{ secrets.INGRESS_TLS_SECRET_NAME }}
# kubectl apply -f ./deploy/deployment.yaml
# envsubst < ./deploy/service.template.yaml | kubectl apply -f -
# set -x
# echo "KUBECONFIG=$KUBECONFIG"
- name: Deploy Home Assistant
shell: bash
run: |
set -e
cd ${{ gitea.workspace }}
export ENDPOINT_IP="${{ secrets.ENDPOINT_IP }}"
export SERVICE_PORT=${{ secrets.SERVICE_PORT }}
export INGRESS_ROUTES_MATCH="${{ secrets.INGRESS_ROUTES_MATCH }}"
export INGRESS_TLS_SECRET_NAME=${{ secrets.INGRESS_TLS_SECRET_NAME }}
kubectl apply -f ./deploy/deployment.yaml
envsubst < ./deploy/service.template.yaml | kubectl apply -f -