Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit e642a1a

Browse files
adding another E2E test (#179)
This E2E test runs once per week and tests userspace with the latest vpp ligato tag Signed-off-by: John O'Loughlin <[email protected]>
1 parent 70ea136 commit e642a1a

File tree

5 files changed

+63
-4
lines changed

5 files changed

+63
-4
lines changed

Diff for: .github/workflows/e2e.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: E2E
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
38
jobs:
49

510
e2e:

Diff for: .github/workflows/e2e_latest_vpp.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: E2E_vpp_latest
2+
on:
3+
schedule:
4+
- cron: "37 4 * * 0"
5+
pull_request:
6+
paths:
7+
- '**e2e_latest_vpp.yml'
8+
push:
9+
branches:
10+
- master
11+
paths:
12+
- '**e2e_latest_vpp.yml'
13+
jobs:
14+
15+
e2e:
16+
name: E2E_vpp_latest
17+
runs-on: hugepage-runner
18+
steps:
19+
- name: Set up Go
20+
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
21+
with:
22+
go-version: 1.20.1
23+
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
24+
- name: vpp_ligato_latest_container
25+
run: source ./ci/ci.sh && vpp_ligato_latest_container
26+
- name: install_go_kubectl_kind
27+
run: source ./ci/ci.sh && install_go_kubectl_kind
28+
- name: create_kind_cluster
29+
run: source ./ci/ci.sh && create_kind_cluster
30+
- name: deploy_multus
31+
run: source ./ci/ci.sh && deploy_multus
32+
- name: vpp_e2e_test
33+
run: source ./ci/ci.sh && vpp_e2e_test
34+

Diff for: ci/ci.sh

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
#!/bin/bash
22
set -e
3-
CI_DIR="/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/ci/"
3+
USERSPACEDIR="/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/"
4+
CI_DIR="$USERSPACEDIR/ci/"
5+
6+
vpp_ligato_latest_container()
7+
{
8+
IMAGE="ligato/vpp-base:latest"
9+
10+
cd $USERSPACEDIR
11+
12+
echo "Changing to latest tag in dockerfile"
13+
sed -i "s|\(FROM\).*\(as builder\)|\1 $IMAGE \2|g" ./docker/userspacecni/Dockerfile
14+
grep -n "$IMAGE" ./docker/userspacecni/Dockerfile
15+
16+
echo "Changing to latest tag vpp pod"
17+
sed -i "s|\(image:\).*\(#imagename\)|\1 $IMAGE \2|g" ./ci/vpp_test_setup/vpp_pod.sh
18+
grep -n "$IMAGE" ./ci/vpp_test_setup/vpp_pod.sh
19+
20+
echo "Changing to latest tag vpp host pod"
21+
sed -i "s|\(image:\).*\(#imagename\)|\1 $IMAGE \2|g" ./ci/vpp_test_setup/vpp_host.sh
22+
grep -n "$IMAGE" ./ci/vpp_test_setup/vpp_host.sh
23+
}
424

525
install_go_kubectl_kind(){
626
wget -qO- https://golang.org/dl/go1.20.1.linux-amd64.tar.gz |tar -C /home/runner -xz

Diff for: ci/vpp_test_setup/vpp_host.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ spec:
5353
hostname: vpp-$worker
5454
subdomain: vpp
5555
containers:
56-
- image: ligato/vpp-base
56+
- image: ligato/vpp-base:23.02 #imagename
5757
imagePullPolicy: IfNotPresent
5858
name: vpp-$worker
5959
volumeMounts:

Diff for: ci/vpp_test_setup/vpp_pod.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
hostname: vpp-app$number-$worker
3030
subdomain: vpp
3131
containers:
32-
- image: ligato/vpp-base
32+
- image: ligato/vpp-base:23.02 #imagename
3333
imagePullPolicy: IfNotPresent
3434
name: vpp-app$number-$worker
3535
volumeMounts:

0 commit comments

Comments
 (0)