-
Notifications
You must be signed in to change notification settings - Fork 68
89 lines (75 loc) · 1.94 KB
/
olm.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
name: OLM
on:
push:
branches: [ main ]
pull_request:
branches:
- main
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+"
defaults:
run:
shell: bash
working-directory: metallboperator
jobs:
main:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.20' ]
name: Go ${{ matrix.go }}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout Metal LB Operator
uses: actions/checkout@v2
with:
path: metallboperator
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: actions/setup-go@v2
id: go
with:
go-version: ${{ matrix.go }}
- name: Verify modules
run: go mod verify
- name: Verify format
run: |
make fmt
git diff --exit-code
- name: Verify release bundle manifests
run: |
make bundle-release
git diff --exit-code -I'^ createdAt: ' bundle
- name: Create and set up K8s Kind Cluster
run: |
./hack/kind-cluster-with-registry.sh
make deploy-olm
- name: Build bundle image
run: |
make build-and-push-bundle-images REPO=localhost:5000
- name: Deploy Metal LB Operator with OLM
run: |
make deploy-with-olm REPO=localhost:5000
- name: E2E Tests
run: |
export KUBECONFIG=${HOME}/.kube/config
make test-validation
SKIP="frr-k8s" make test-e2e
- name: Archive E2E Tests logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: test_e2e_logs
path: /tmp/test_e2e_logs/
- name: Export kind logs
if: ${{ failure() }}
run: |
kind export logs /tmp/kind_logs
- name: Archive kind logs
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: kind_logs
path: /tmp/kind_logs