-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.54 KB
/
bootstrap-test.yml
File metadata and controls
59 lines (50 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: bootstrap-kind-test
on:
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened]
push:
branches:
- main
jobs:
e2e:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v6
with: { fetch-depth: 0 }
- name: Bootstrap KIND cluster
id: bootstrap
uses: ./.github/actions/kind-bootstrap
with:
cluster_name: test-infra
wait_timeout: 240s
images: |
nginx:1.27-alpine
busybox:latest
- name: Verify images pre-loaded on every node
run: |
set -euo pipefail
CLUSTER=test-infra
# Exactly what you asked KIND to load
IMAGES=(
"docker.io/library/nginx:1.27-alpine"
"docker.io/library/busybox:latest"
)
for node in $(kind get nodes --name "$CLUSTER"); do
# Build a simple newline-separated list: repo:tag
image_list=$(docker exec "$node" crictl images \
| awk 'NR>1 {print $1 ":" $2}') # skip header
for img in "${IMAGES[@]}"; do
if grep -qx "$img" <<<"$image_list"; then
echo "✅ $img present on $node"
else
echo "❌ $img missing on $node"
exit 1
fi
done
done
- name: Smoke-check cluster
run: kubectl get pods -A