-
-
Notifications
You must be signed in to change notification settings - Fork 228
70 lines (57 loc) · 1.95 KB
/
e2e-chainsaw.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
name: E2E chainsaw tests
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
name: ${{ matrix.testpath }}
runs-on: ubuntu-latest
strategy:
matrix:
testpath:
- ./tests/e2e-chainsaw/v1beta2/teardown/
- ./tests/e2e-chainsaw/v1beta2/setup/
- ./tests/e2e-chainsaw/v1beta2/hostnetwork/
- ./tests/e2e-chainsaw/v1beta2/password/
- ./tests/e2e-chainsaw/v1beta2/ha-setup/
- ./tests/e2e-chainsaw/v1beta2/nodeport/
- ./tests/e2e-chainsaw/v1beta2/pvc-name/
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build Dockerfile
run: docker build . --file Dockerfile --tag redis-operator:e2e
- name: Install chainsaw
uses: kyverno/chainsaw/.github/actions/[email protected]
with:
release: v0.0.9
- name: Check install
run: chainsaw version
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
# - name: Install Redis
# uses: shogo82148/actions-setup-redis@v1
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
config: tests/_config/kind-config.yaml
cluster_name: kind
- name: Load Docker image into Kind
run: |
kubectl cluster-info --context kind-kind
kind load docker-image redis-operator:e2e --name kind
- name: Install Redis Operator
run: |
make deploy IMG=redis-operator:e2e
- name: Wait for Redis Operator to be ready
run: |
kubectl wait --for=condition=available --timeout=300s deployment/redis-operator-redis-operator -n redis-operator-system
- name: Run chainsaw test
run: chainsaw test --test-dir ${{ matrix.testpath }} --config tests/_config/chainsaw-configuration.yaml