Skip to content

Commit

Permalink
adding another E2E test
Browse files Browse the repository at this point in the history
This E2E test runs once per week and tests userspace with
the latest vpp ligato tag

Signed-off-by: John O'Loughlin <[email protected]>
  • Loading branch information
johnoloughlin committed Sep 29, 2023
1 parent 70ea136 commit dec058a
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/e2e_latest_vpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: E2E_vpp_latest
on:
schedule:
- cron: "37 4 * * 0"
push:
paths:
- '**e2e_latest_vpp.yml'
jobs:

e2e:
name: E2E_vpp_latest
runs-on: hugepage-runner
steps:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: 1.20.1
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: vpp_ligato_latest_container
run: source ./ci/ci.sh && vpp_ligato_latest_container
- name: install_go_kubectl_kind
run: source ./ci/ci.sh && install_go_kubectl_kind
- name: create_kind_cluster
run: source ./ci/ci.sh && create_kind_cluster
- name: deploy_multus
run: source ./ci/ci.sh && deploy_multus
- name: vpp_e2e_test
run: source ./ci/ci.sh && vpp_e2e_test

20 changes: 19 additions & 1 deletion ci/ci.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
#!/bin/bash
set -e
CI_DIR="/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/ci/"
USERSPACEDIR="/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/"
CI_DIR="$USERSPACEDIR/ci/"

vpp_ligato_latest_container()
{
IMAGE="ligato/vpp-base:latest"

cd $USERSPACEDIR

echo "Changing to latest tag in dockerfile"
sed -i "s|\(FROM\).*\(as builder\)|\1 $IMAGE \2|g" ./docker/userspacecni/Dockerfile

echo "Changing to latest tag vpp pod"
sed -i "s|\(image:\).*\(#imagename\)|\1 $IMAGE \2|g" ./ci/vpp_test_setup/vpp_pod.sh

echo "Changing to latest tag vpp host pod"
sed -i "s|\(image:\).*\(#imagename\)|\1 $IMAGE \2|g" ./ci/vpp_test_setup/vpp_host.sh

}

install_go_kubectl_kind(){
wget -qO- https://golang.org/dl/go1.20.1.linux-amd64.tar.gz |tar -C /home/runner -xz
Expand Down
2 changes: 1 addition & 1 deletion ci/vpp_test_setup/vpp_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
hostname: vpp-$worker
subdomain: vpp
containers:
- image: ligato/vpp-base
- image: ligato/vpp-base:23.02 #imagename
imagePullPolicy: IfNotPresent
name: vpp-$worker
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion ci/vpp_test_setup/vpp_pod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
hostname: vpp-app$number-$worker
subdomain: vpp
containers:
- image: ligato/vpp-base
- image: ligato/vpp-base:23.02 #imagename
imagePullPolicy: IfNotPresent
name: vpp-app$number-$worker
volumeMounts:
Expand Down

0 comments on commit dec058a

Please sign in to comment.