Add CI script for k8s deployment test #705

Merged
telackey merged 1 commits from dboreham/enable-k8s-ci into main 2024-01-16 23:16:07 +00:00
3 changed files with 16 additions and 9 deletions

View File

@ -44,12 +44,9 @@ jobs:
- name: Start dockerd # Also needed until we can incorporate into the executor - name: Start dockerd # Also needed until we can incorporate into the executor
run: | run: |
dockerd -H $DOCKER_HOST --userland-proxy=false & dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5 - name: "Install kind"
- name: "Install Go" run: ./tests/scripts/install-kind.sh
uses: actions/setup-go@v4 - name: "Install Kubectl"
with: run: ./tests/scripts/install-kubectl.sh
go-version: '1.21' - name: "Run k8s deployment test"
- name: "Install Kind" run: ./tests/k8s-deploy/run-deploy-test.sh
run: go install sigs.k8s.io/kind@v0.20.0
- name: "Debug Kind"
run: kind create cluster --retain && docker logs kind-control-plane

5
tests/scripts/install-kind.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# TODO: handle ARM
curl --silent -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
chmod +x ./kind
mv ./kind /usr/local/bin

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# TODO: handle ARM
curl --silent -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
mv ./kubectl /usr/local/bin