forked from ovn-kubernetes/ovn-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
167 lines (143 loc) · 4.61 KB
/
test_periodic.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
160
161
162
163
164
165
166
167
name: ovn-ci-periodic
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
permissions:
contents: read
env:
GO_VERSION: "1.19.6"
K8S_VERSION: v1.24.0
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:
if: github.repository == 'ovn-org/ovn-kubernetes' || github.event_name == 'workflow_dispatch'
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
ref: master
- name: Build
run: |
set -x
pushd go-controller
make
make windows
popd
- name: Build docker image
run: |
pushd dist/images
sudo cp -f ../../go-controller/_output/go/bin/ovn* .
sudo cp -f ../../go-controller/_output/go/bin/hybrid-overlay-node .
echo "ref: $(git rev-parse --symbolic-full-name HEAD) commit: $(git rev-parse HEAD)" > git_info
docker build -t ovn-daemonset-f:dev -f Dockerfile.fedora .
mkdir _output
docker save ovn-daemonset-f:dev > _output/image.tar
popd
- uses: actions/upload-artifact@v3
with:
name: test-image
path: dist/images/_output/image.tar
k8s:
if: github.repository == 'ovn-org/ovn-kubernetes' || github.event_name == 'workflow_dispatch'
name: Build k8s
runs-on: ubuntu-latest
steps:
- name: Set up environment
run: |
export GOPATH=$(go env GOPATH)
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
echo "$GOPATH/bin" >> $GITHUB_PATH
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Install KIND
run: |
sudo curl -Lo /usr/local/bin/kind https://github.com/aojea/kind/releases/download/dualstack/kind
sudo chmod +x /usr/local/bin/kind
e2e-dual:
if: github.repository == 'ovn-org/ovn-kubernetes' || github.event_name == 'workflow_dispatch'
name: e2e-dual
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
target:
- "shard-conformance"
- "control-plane"
ha: [ "HA", "noHA" ]
ipfamily: [ "dualstack" ]
exclude:
# Not currently supported but needs to be.
# See e2e in test.yml
- {"ipfamily": "dualstack", "target": "control-plane"}
needs: [build, k8s]
env:
JOB_NAME: "${{ matrix.target }}-${{ matrix.ha }}-${{ matrix.ipfamily }}"
OVN_HA: "${{ matrix.ha == 'HA' }}"
# Deploy dual stack cluster
KIND_IPV4_SUPPORT: "${{ matrix.ipfamily == 'IPv4' || matrix.ipfamily == 'dualstack' }}"
KIND_IPV6_SUPPORT: "${{ matrix.ipfamily == 'IPv6' || matrix.ipfamily == 'dualstack' }}"
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Set up environment
run: |
export GOPATH=$(go env GOPATH)
echo "GOPATH=$GOPATH" >> $GITHUB_ENV
echo "$GOPATH/bin" >> $GITHUB_PATH
- name: Free up disk space
run: |
sudo eatmydata apt-get purge --auto-remove -y \
azure-cli aspnetcore-* dotnet-* ghc-* firefox \
google-chrome-stable \
llvm-* microsoft-edge-stable mono-* \
msbuild mysql-server-core-* php-* php7* \
powershell temurin-* zulu-*
- name: Install KIND
run: |
sudo curl -Lo /usr/local/bin/kind https://github.com/aojea/kind/releases/download/dualstack/kind
sudo chmod +x /usr/local/bin/kind
- uses: actions/download-artifact@v3
with:
name: test-image
- name: Load docker image
run: |
docker load --input image.tar && rm -rf image.tar
- name: kind setup
run: |
export OVN_IMAGE="ovn-daemonset-f:dev"
make -C test install-kind
- name: Run Tests
run: |
make -C test ${{ matrix.target }}
- name: Export logs
if: always()
run: |
mkdir -p /tmp/kind/logs
kind export logs --name ${KIND_CLUSTER_NAME} --loglevel=debug /tmp/kind/logs
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
with:
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
path: /tmp/kind/logs