Repository navigation
106 lines (88 loc) · 3.24 KB
/
Copy pathe2e.yaml
File metadata and controls
106 lines (88 loc) · 3.24 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: E2E tests
on:
push:
branches:
- main
- "release-[0-9]+.[0-9]+*"
pull_request:
env:
KUBECTL_VERSION: 'v1.37.0'
jobs:
build:
name: Image build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Build and export
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
tags: controller:local
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/controller.tar
- name: Upload artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: controller
path: /tmp/controller.tar
chart:
name: Shell script tests with chart install
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
kube: ["1.35", "1.36", "1.37"]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Download artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: controller
path: /tmp
- name: Load image
run: |
docker load --input /tmp/controller.tar
docker image ls -a
- name: Set up kubectl
uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4.0.1
with:
version: ${{ env.KUBECTL_VERSION }}
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# See https://github.com/kubernetes-sigs/kind/releases/tag/v0.33.0
- name: Determine KinD node image version
id: node_image
run: |
case ${{ matrix.kube }} in
1.35)
NODE_IMAGE=kindest/node:v1.35.8@sha256:07b2536e30b803ed61d1677a79df6115f798ce64c80f9e22f6ed45afd09323c0 ;;
1.36)
NODE_IMAGE=kindest/node:v1.36.4@sha256:099e049362a1526b2db71494e1947aae99bd16290d7c895f2b7ea312e3cbfaed ;;
1.37)
NODE_IMAGE=kindest/node:v1.37.0@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5 ;;
esac
echo "image=$NODE_IMAGE" >> $GITHUB_OUTPUT
- name: Make setup
run: make kind-cluster stern
env:
KIND_IMAGE: ${{ steps.node_image.outputs.image }}
- name: Test
run: e2e/e2e_test.sh
- name: Print last 10k kubernetes logs from default, collector and example-tenant-ns namespaces
if: always()
run: |
mkdir -p build/_test
bin/stern -n default,collector,example-tenant-ns ".*" --tail 100000 --no-follow > build/_test/cluster.logs
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: script-e2e-test-cluster-logs-${{ matrix.kube }}
path: build/_test
retention-days: 5