Skip to content

Commit 0a2a5f3

Browse files
committed
debug docker and k8s deployment tests
1 parent b47efd0 commit 0a2a5f3

File tree

6 files changed

+25
-21
lines changed

6 files changed

+25
-21
lines changed

.github/workflows/test-deployments.yml

+14-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
jobs:
2121
build-linux-packages:
2222
name: Build ${{ matrix.package_name }} ${{ matrix.arch.gox }} ${{ matrix.packager }}
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
2424
strategy:
2525
matrix:
2626
package_name:
@@ -77,7 +77,7 @@ jobs:
7777
dry-run-linux-packages:
7878
needs: build-linux-packages
7979
name: Dry Run ${{ format('{0}:{1}', matrix.distro.name, matrix.distro.version) }} ${{ matrix.arch.gox }}
80-
runs-on: ubuntu-latest
80+
runs-on: ubuntu-24.04
8181
env:
8282
ZITI_PWD: ziggypw
8383
ZITI_CTRL_ADVERTISED_ADDRESS: linux-controller.127.21.71.0.sslip.io
@@ -178,7 +178,7 @@ jobs:
178178
179179
test-linux-services:
180180
name: Test Debian Linux Services
181-
runs-on: ubuntu-latest
181+
runs-on: ubuntu-24.04
182182
steps:
183183
- name: Shallow checkout
184184
uses: actions/checkout@v4
@@ -215,7 +215,7 @@ jobs:
215215
216216
docker-deployments:
217217
name: Test Docker Deployments
218-
runs-on: ubuntu-latest
218+
runs-on: ubuntu-24.04
219219
env:
220220
ZIGGY_UID: 1001 # let container EUID run-as GHA "runner" user to share cache, etc.
221221
steps:
@@ -228,15 +228,22 @@ jobs:
228228
with:
229229
go-version-file: ./go.mod
230230

231-
- name: Run the Compose Test Script
231+
- name: Debug EUID
232232
shell: bash
233-
run: dist/docker-images/compose.test.bash
233+
run: |
234+
235+
set -o xtrace
236+
echo "EUID: $(id -u); ZIGGY_UID: $(id "$ZIGGY_UID")"
237+
238+
- name: Run the Docker Test Script
239+
shell: bash
240+
run: dist/docker-images/docker.test.bash
234241
env:
235242
ZITI_GO_VERSION: ${{ steps.setup-go.outputs.go-version }}
236243

237244
kubernetes-deployments:
238245
name: Test Kubernetes Deployments
239-
runs-on: ubuntu-latest
246+
runs-on: ubuntu-24.04
240247
env:
241248
ZITI_NAMESPACE: zititest
242249
steps:
@@ -257,4 +264,3 @@ jobs:
257264
- name: Run the Kubernetes Test Script
258265
shell: bash
259266
run: ./dist/docker-images/k8s.test.bash --cpus=2 # GitHub runners have 4 vCPUs
260-

dist/dist-packages/linux/linux.test.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ fi
184184

185185
ZITI_CTRL_EDGE_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS} \
186186
ZITI_CTRL_EDGE_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT} \
187-
go test -v -count=1 -tags="quickstart manual" ./ziti/cmd/edge/...
187+
go test -v -count=1 -tags="quickstart manual" ./ziti/run/...
188188

189189
ATTEMPTS=5
190190
DELAY=3

dist/docker-images/compose.test.bash dist/docker-images/docker.test.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ docker compose up ziti-router --detach
126126
unset GOOS
127127
ZITI_CTRL_EDGE_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS} \
128128
ZITI_CTRL_EDGE_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT} \
129-
go test -v -count=1 -tags="quickstart manual" ./ziti/cmd/edge/...
129+
go test -v -count=1 -tags="quickstart manual" ./ziti/run/...
130130

131131
ATTEMPTS=5
132132
DELAY=3

dist/docker-images/k8s.test.bash

+7-9
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,9 @@ image:
122122
pullPolicy: Never
123123
ROUTER
124124

125-
./quickstart/kubernetes/miniziti.bash start \
125+
bash -x ./quickstart/kubernetes/miniziti.bash start \
126126
--profile "${ZITI_NAMESPACE}" \
127127
--no-hosts \
128-
--debug \
129128
--values-dir "${EXTRA_VALUES_DIR}"
130129

131130
MINIKUBE_IP="$(minikube --profile "${ZITI_NAMESPACE}" ip)"
@@ -134,14 +133,13 @@ MINIKUBE_IP="$(minikube --profile "${ZITI_NAMESPACE}" ip)"
134133
curl -skSfw '%{http_code}\t%{url}\n' -o/dev/null "https://miniziti-controller.${MINIKUBE_IP}.sslip.io/zac/"
135134

136135
ZITI_PWD=$(
137-
minikube kubectl --profile "${ZITI_NAMESPACE}" -- \
138-
--context "${ZITI_NAMESPACE}" \
139-
get secrets "ziti-controller-admin-secret" \
140-
--namespace "${ZITI_NAMESPACE}" \
141-
--output go-template='{{index .data "admin-password" | base64decode }}'
136+
minikube kubectl --profile "${ZITI_NAMESPACE}" -- \
137+
--context "${ZITI_NAMESPACE}" \
138+
get secrets "ziti-controller-admin-secret" \
139+
--namespace "${ZITI_NAMESPACE}" \
140+
--output go-template='{{index .data "admin-password" | base64decode }}'
142141
)
143142

144-
145143
export \
146144
ZITI_PWD \
147145
ZITI_ROUTER_NAME="miniziti-router" \
@@ -150,6 +148,6 @@ ZITI_CTRL_ADVERTISED_ADDRESS="miniziti-controller.${MINIKUBE_IP}.sslip.io"
150148
ZITI_CTRL_EDGE_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS} \
151149
ZITI_CTRL_EDGE_ADVERTISED_PORT=${ZITI_CTRL_ADVERTISED_PORT} \
152150
ZITI_TEST_BIND_ADDRESS="ziti-controller-client.${ZITI_NAMESPACE}.svc.cluster.local" \
153-
go test -v -count=1 -tags="quickstart manual" ./ziti/cmd/edge/...
151+
go test -v -count=1 -tags="quickstart manual" ./ziti/run/...
154152

155153
cleanup

dist/docker-images/ziti-controller/compose.test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ volumes:
44
services:
55
ziti-controller:
66
volumes:
7-
- ziti-test:/home/ziggy/.config/ziti
7+
- ziti-test:/home/ziggy
88

99
wait-for-controller:
1010
profiles:

dist/docker-images/ziti-router/compose.test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ services:
33
networks:
44
- ziti
55
volumes:
6-
- ziti-test:/home/ziggy/.config/ziti
6+
- ziti-test:/home/ziggy

0 commit comments

Comments
 (0)