Compare commits

...

39 Commits

Author SHA1 Message Date
2a40e91a2c modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 16s
2025-11-22 16:23:59 +00:00
cf399e576c modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 16s
2025-11-22 16:15:06 +00:00
2a9c6c81dc modified: .gitea/workflows/deploy.yaml
Some checks are pending
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Waiting to run
2025-11-22 16:02:48 +00:00
46e643d54c modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 14s
2025-11-22 13:58:35 +00:00
e94e8b7ddf modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 13s
2025-11-22 13:37:14 +00:00
6697aef2c9 modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 12s
2025-11-22 13:33:25 +00:00
42bf119389 modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 13s
2025-11-22 13:29:56 +00:00
3c83a19ec3 modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 12s
2025-11-22 13:24:45 +00:00
554cf265b8 modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 13s
2025-11-22 13:22:45 +00:00
64e431f335 .
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 12s
2025-11-22 13:21:16 +00:00
2c9a6806ab modified: .gitea/actions/kubectl-setup/action.yml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 13m42s
2025-11-22 12:40:04 +00:00
c2b97b4066 modified: .gitea/actions/kubectl-setup/action.yml
Some checks are pending
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Waiting to run
2025-11-22 12:32:31 +00:00
c42dbef22c clean up. Working workflow
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 16s
2025-11-22 04:41:28 +00:00
5fec908323 .
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 16s
2025-11-22 04:31:17 +00:00
d119f5f383 modified: deploy/service.template.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 16s
2025-11-22 04:28:09 +00:00
fd94e57068 s
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 15s
s
2025-11-22 04:26:24 +00:00
b9295ce120 s
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 16s
2025-11-22 04:19:26 +00:00
e344b84715 «modified: .gitea/workflows/deploy.yaml 2025-11-22 04:15:41 +00:00
fea4db704f .
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 13s
2025-11-22 04:12:27 +00:00
7df670bcc2 modified: .gitea/workflows/deploy.yaml
Some checks are pending
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Waiting to run
2025-11-22 04:10:52 +00:00
ac2e287429 modified: .gitea/workflows/deploy.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 21s
2025-11-22 04:02:20 +00:00
74dc2068c8 .
Some checks are pending
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Waiting to run
2025-11-22 03:46:45 +00:00
86687012c9 modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 14s
2025-11-22 03:19:26 +00:00
1c6342b2b5 modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 16s
2025-11-22 03:17:24 +00:00
19c564724f modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 15s
2025-11-22 03:15:01 +00:00
7d50ebaf22 modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 15s
2025-11-22 03:12:44 +00:00
0d193bcc7a modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 14s
2025-11-22 03:10:11 +00:00
a295f671e4 modified: .gitea/workflows/deploy.yaml
Some checks are pending
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Waiting to run
2025-11-22 03:05:58 +00:00
5d7bc73f2c modified: .gitea/workflows/deploy.yaml
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 14s
2025-11-22 03:01:41 +00:00
d35544ca2b modified: .gitea/actions/kubectl-setup/action.yml
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 14s
2025-11-22 02:58:54 +00:00
10f585819d modified: .gitea/actions/kubectl-setup/action.yml
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 14s
2025-11-22 02:55:30 +00:00
3a3f64a59b modified: .gitea/workflows/deploy.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 14s
2025-11-22 02:51:41 +00:00
160176f905 modified: .gitea/workflows/deploy.yaml 2025-11-22 02:42:52 +00:00
d8e6d72e25 simple kubectl test
Some checks are pending
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Waiting to run
2025-11-22 02:30:43 +00:00
1b7b53ddd1 added GITHUB_TEMP env
Some checks are pending
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Waiting to run
2025-11-22 02:25:39 +00:00
ac33cbfc6d fx actions folder name
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 14s
2025-11-22 02:20:02 +00:00
cf4dd050ca re enable actions
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Failing after 15s
2025-11-22 02:17:22 +00:00
473808832b fix runs-on
All checks were successful
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Successful in 15s
2025-11-22 02:16:12 +00:00
f29285d800 clean up workflow
Some checks failed
Casa Home Assistant CI/CD Pipeline (testing) / build (push) Has been cancelled
2025-11-22 02:13:36 +00:00
3 changed files with 68 additions and 27 deletions

View File

@@ -1,15 +1,15 @@
name: Setup kubectl
description: "Reads kube config from inputs and sets KUBECONFIG"
description: "Reads kube config from inputs and sets kube config"
inputs:
kube_server:
description: "Kubernetes API server address"
description: "Kubernetes server address and port. Example (https://serverip:6443)"
required: true
kube_ca_base64:
description: "Base64-encoded CA certificate"
description: "Base64-encoded Kubernetes cluster CA certificate"
required: true
kube_token:
description: "ServiceAccount token"
description: "Kubernetes ServiceAccount token"
required: true
runs:
@@ -19,8 +19,33 @@ runs:
shell: bash
run: |
set -euo pipefail
mkdir -p "${GITHUB_TEMP}/.kube"
# check arguments
ERROR=0
if [ -z "${{ inputs.kube_server }}" ]; then
echo "❌ ERROR: kube_server input is empty or not set"
$ERROR=1
fi
if [ -z "${{ inputs.kube_ca_base64 }}" ]; then
echo "❌ ERROR: kube_ca_base64 input is empty or not set"
$ERROR=1
fi
if [ -z "${{ inputs.kube_server }}" ]; then
echo "❌ ERROR: kube_token input is empty or not set"
$ERROR=1
fi
if [ "$ERROR" != 0 ]; then
echo "❌ ERROR code $ERROR"
exit "$ERROR"
fi
# end check arguments
# creates kube config
mkdir -p "${GITHUB_TEMP}/.kube"
cat <<EOF > "${GITHUB_TEMP}/.kube/config"
apiVersion: v1
kind: Config
@@ -42,4 +67,9 @@ runs:
token: ${{ inputs.kube_token }}
EOF
# sets KUBECONFIG environment variable
echo "KUBECONFIG=${GITHUB_TEMP}/.kube/config" >> "${GITHUB_ENV}"
# tests communication to server (add v argument if debug is required)
curl -kv -cacert <(echo "${{ inputs.kube_ca_base64 }}" | base64 -d) -H "Authorization: Bearer ${{ inputs.kube_token }}" ${{ inputs.kube_server }}/version

View File

@@ -1,35 +1,51 @@
name: Casa Home Assistant CI/CD Pipeline
name: Casa Home Assistant CI/CD Pipeline (testing)
on:
push:
branches:
- fix/*
- main
pull_request:
jobs:
build:
runs-on: mf-casa-vlan-cid-runner
runs-on: casa-vlan-cicd
env:
GITHUB_TEMP: ${{ runner.temp }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup kubectl
uses: ./.github/actions/kubectl-setup
with:
kube_server: ${{ secrets.casa_vlan_kube_server }}
kube_ca_base64: ${{ secrets.casa_vlan_kube_ca_base64 }}
kube_token: ${{ secrets.casa_vlan_kube_token }}
- name: Deploy Home Assistant
shell: bash
- name: setup actions from
run: |
ls -lah ${{ runner.temp }}
mkdir -p ${{ runner.temp }}/gitea_src
mkdir -p ${{ gitea.workspace }}/.gitea/actions
git clone -b main --depth=1 https://git.limbosolutions.com/kb/gitea ${{ runner.temp }}/gitea_src/.gitea
ln -s ${{ runner.temp }}/gitea_src/.gitea/actions/kubectl-setup ${{ gitea.workspace }}/.gitea/actions/kubectl-setup
ls -lah ${{ gitea.workspace }}/.gitea/actions/kubectl-setup
cat ${{ gitea.workspace }}/.gitea/actions/kubectl-setup/action.yaml
- name: Setup kubectl
uses: ./.gitea/actions/kubectl-setup
with:
kube_server: ${{ secrets.CASA_VLAN_KUBE_SERVER }}
kube_ca_base64: ${{ secrets.CASA_VLAN_KUBE_CA_BASE64 }}
kube_token: ${{ secrets.CASA_VLAN_KUBE_TOKEN }}
- name: Deploy Home Assistant
shell: bash
env:
ENDPOINT_IP: "${{ secrets.CASA_HOMEASSISTANT_ENDPOINT_IP }}"
SERVICE_PORT: "${{ secrets.CASA_HOMEASSISTANT_ENDPOINT_SERVICE_PORT }}"
INGRESS_ROUTES_MATCH: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_ROUTES_MATCH }}"
INGRESS_TLS_SECRET_NAME: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_TLS_SECRET_NAME }}"
run: |
#set -x for debugging
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 -

View File

@@ -33,11 +33,6 @@ spec:
spec:
dnsPolicy: ClusterFirstWithHostNet # ensures pod uses cluster DNS (CoreDNS) for service discovery even with host networking
hostNetwork: true
# delays start so host have time to start on low memory resources
# initContainers:
# - name: delay-start
# image: busybox:latest
# command: ["sh", "-c", "sleep 60"]
containers:
- name: home-assistant
image: "homeassistant/home-assistant"