-
Notifications
You must be signed in to change notification settings - Fork 12
77 lines (71 loc) · 2.06 KB
/
e2e.yml
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
name: E2E
on:
workflow_call:
jobs:
images:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.publish.outputs.image }}
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
- name: "Publish Image"
id: "publish"
run: |
export UUID=$(uuidgen)
export IMG="ttl.sh/${UUID}-${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}:1h"
echo $IMG
echo "image=${IMG}" >> "$GITHUB_OUTPUT"
make docker-build docker-push
e2e:
runs-on: ubuntu-latest
needs:
- images
env:
IMG: ${{needs.images.outputs.image}}
strategy:
matrix:
kubernetes-version:
- "1.27.3"
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "SetUp Go"
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
- name: 'SetUp KinD'
uses: container-tools/kind-action@v2
with:
version: "v0.20.0"
kubectl_version: v${{ matrix.kubernetes-version }}
registry: false
node_image: kindest/node:v${{ matrix.kubernetes-version }}
config: test/e2e/kind.yaml
- name: 'SetUp Kind Ingress'
run: |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl wait \
--namespace=ingress-nginx \
--for=condition=ready \
pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s
- name: "SetUp Kaoto Operator"
run: |
make deploy/e2e
kubectl wait \
--namespace=kaoto-system \
--for=condition=ready \
pod \
--selector=control-plane=kaoto-operator \
--timeout=90s
- name: "Run e2e"
run: |
make test/e2e