This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
forked from kube-logging/logging-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (74 loc) · 2.59 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
78
79
80
81
82
83
84
85
86
87
88
89
90
name: E2E tests
on:
pull_request:
push:
branches:
- master
env:
GO_VERSION: '1.19.3'
KIND_VERSION: 'v0.17.0'
KIND_NODE_VERSION: 'v1.23.13@sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61'
KUBECTL_VERSION: 'v1.24.1'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: ${{ env.KUBECTL_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run e2e tests
run: make test-e2e
basic_flow:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: ${{ env.KUBECTL_VERSION }}
- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
with:
version: "${{ env.KIND_VERSION }}"
image: "kindest/node:${{ env.KIND_NODE_VERSION }}"
- name: Checkout code
uses: actions/checkout@v4
- name: Build controller image
run: |
make docker-build IMG='controller:local'
- name: Build e2e fluentd image
run: |
make docker-build-e2e-fluentd IMG='fluentd:local'
- name: Create logging namespace
run: |
kubectl create namespace logging
- name: Start Minio
run: |
kubectl create -f hack/minio.yaml
kubectl wait --namespace logging --for=condition=available deployment/minio-deployment --timeout=120s
minio="$(kubectl get pod --namespace logging -l app=minio -o 'jsonpath={.items[0].metadata.name}')"
kubectl wait --namespace logging --for=condition=Ready pod "${minio}" --timeout=120s
- name: Setup minio cli
run: |
kubectl create -f hack/minio-mc.yaml
kubectl wait --namespace logging --for=condition=available deployment/minio-mc-deployment --timeout=120s
mc_pod="$(kubectl get pod --namespace logging -l app=minio-mc -o 'jsonpath={.items[0].metadata.name}')"
kubectl wait --namespace logging --for=condition=Ready pod "${mc_pod}" --timeout=120s
kubectl exec --namespace logging "${mc_pod}" -- \
mc config host add minio \
'http://minio-service.logging.svc.cluster.local:9000' \
'minio_access_key' \
'minio_secret_key'
- name: Run test
run: |
hack/test.sh