forked from ovn-org/ovn
-
Notifications
You must be signed in to change notification settings - Fork 1
159 lines (141 loc) · 4.63 KB
/
ovn-kubernetes.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: ovn-kubernetes
on:
push:
pull_request:
workflow_dispatch:
schedule:
# Run Sunday at midnight
- cron: '0 0 * * 0'
env:
GO_VERSION: "1.17.6"
K8S_VERSION: v1.23.3
OVNKUBE_COMMIT: "master"
LIBOVSDB_COMMIT: "8081fe24e48f"
KIND_CLUSTER_NAME: ovn
KIND_INSTALL_INGRESS: true
KIND_ALLOW_SYSTEM_WRITES: true
# This skips tests tagged as Serial
# Current Serial tests are not relevant for OVN
PARALLEL: true
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Check out ovn
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build ovn-kubernetes container
run: |
docker build --build-arg OVNKUBE_COMMIT=${{ env.OVNKUBE_COMMIT }} \
--build-arg LIBOVSDB_COMMIT=${{ env.LIBOVSDB_COMMIT }} \
-t ovn-daemonset-f:dev -f .ci/ovn-kubernetes/Dockerfile .
mkdir /tmp/_output
docker save ovn-daemonset-f:dev > /tmp/_output/image.tar
- uses: actions/upload-artifact@v2
with:
name: test-image
path: /tmp/_output/image.tar
e2e:
name: e2e
if: github.event_name != 'schedule'
runs-on: ubuntu-20.04
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
target:
- shard: shard-conformance
hybrid-overlay: false
multicast-enable: false
emptylb-enable: false
- shard: control-plane
hybrid-overlay: true
multicast-enable: true
emptylb-enable: true
ipfamily:
- ip: ipv4
name: "IPv4"
ipv4: true
ipv6: false
- ip: ipv6
name: "IPv6"
ipv4: false
ipv6: true
- ip: dualstack
name: "Dualstack"
ipv4: true
ipv6: true
# Example of how to exclude a fully qualified test:
# - {"ipfamily": {"ip": ipv4}, "ha": {"enabled": "false"}, "gateway-mode": shared, "target": {"shard": shard-n-other}}
exclude:
# Not currently supported but needs to be.
- {"ipfamily": {"ip": dualstack}, "target": {"shard": control-plane}}
- {"ipfamily": {"ip": ipv6}, "target": {"shard": control-plane}}
needs: [build]
env:
JOB_NAME: "${{ matrix.target.shard }}-${{ matrix.ipfamily.name }}"
OVN_HA: "true"
KIND_IPV4_SUPPORT: "${{ matrix.ipfamily.ipv4 }}"
KIND_IPV6_SUPPORT: "${{ matrix.ipfamily.ipv6 }}"
OVN_HYBRID_OVERLAY_ENABLE: "${{ matrix.target.hybrid-overlay }}"
OVN_GATEWAY_MODE: "shared"
OVN_MULTICAST_ENABLE: "${{ matrix.target.multicast-enable }}"
OVN_EMPTY_LB_EVENTS: "${{ matrix.target.emptylb-enable }}"
steps:
- name: Free up disk space
run: sudo eatmydata apt-get remove --auto-remove -y aspnetcore-* dotnet-* libmono-* mono-* msbuild php-* php7* ghc-* zulu-*
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out ovn-kubernetes
uses: actions/checkout@v2
with:
path: src/github.com/ovn-org/ovn-kubernetes
repository: ovn-org/ovn-kubernetes
- name: Set up environment
run: |
export GOPATH=$(go env GOPATH)
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
echo "$GOPATH/bin" >> $GITHUB_PATH
- name: Disable ufw
# For IPv6 and Dualstack, ufw (Uncomplicated Firewall) should be disabled.
# Not needed for KIND deployments, so just disable all the time.
run: |
sudo ufw disable
- uses: actions/download-artifact@v2
with:
name: test-image
- name: Load docker image
run: |
docker load --input image.tar
- name: kind setup
run: |
export OVN_IMAGE="ovn-daemonset-f:dev"
make -C test install-kind
working-directory: src/github.com/ovn-org/ovn-kubernetes
- name: Run Tests
run: |
make -C test ${{ matrix.target.shard }}
working-directory: src/github.com/ovn-org/ovn-kubernetes
- name: Upload Junit Reports
if: always()
uses: actions/upload-artifact@v2
with:
name: kind-junit-${{ env.JOB_NAME }}-${{ github.run_id }}
path: 'src/github.com/ovn-org/ovn-kubernetes/test/_artifacts/*.xml'
- name: Export logs
if: always()
run: |
mkdir -p /tmp/kind/logs
kind export logs --name ${KIND_CLUSTER_NAME} --loglevel=debug /tmp/kind/logs
working-directory: src/github.com/ovn-org/ovn-kubernetes
- name: Upload logs
if: always()
uses: actions/upload-artifact@v2
with:
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: /tmp/kind/logs