Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding another E2E test #179

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: E2E
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:

e2e:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/e2e_latest_vpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: E2E_vpp_latest
on:
schedule:
- cron: "37 4 * * 0"
pull_request:
paths:
- '**e2e_latest_vpp.yml'
push:
branches:
- master
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

22 changes: 21 additions & 1 deletion ci/ci.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
#!/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
grep -n "$IMAGE" ./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
grep -n "$IMAGE" ./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
grep -n "$IMAGE" ./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
Loading