From 55deda8dd7f17e830236a9f0926cedf8cacfc6f6 Mon Sep 17 00:00:00 2001 From: John O'Loughlin Date: Mon, 2 Oct 2023 10:54:04 +0000 Subject: [PATCH] Adding kind multiversion testing Signed-off-by: John O'Loughlin --- .github/workflows/e2e_latest_vpp.yml | 34 ---------------- .github/workflows/weekly_e2e.yml | 60 ++++++++++++++++++++++++++++ ci/ci.sh | 10 +++-- 3 files changed, 67 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/e2e_latest_vpp.yml create mode 100644 .github/workflows/weekly_e2e.yml diff --git a/.github/workflows/e2e_latest_vpp.yml b/.github/workflows/e2e_latest_vpp.yml deleted file mode 100644 index 528aed75..00000000 --- a/.github/workflows/e2e_latest_vpp.yml +++ /dev/null @@ -1,34 +0,0 @@ -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@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.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 - diff --git a/.github/workflows/weekly_e2e.yml b/.github/workflows/weekly_e2e.yml new file mode 100644 index 00000000..9760c87c --- /dev/null +++ b/.github/workflows/weekly_e2e.yml @@ -0,0 +1,60 @@ +name: Weekly_E2E +on: + schedule: + - cron: "37 4 * * 0" + pull_request: + paths: + - '**weekly_e2e.yml' + push: + branches: + - master + paths: + - '**weekly_e2e.yml' +jobs: + + vpp_latest: + name: E2E_vpp_latest + runs-on: hugepage-runner + steps: + - name: Set up Go + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.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 + + kind_multiversion: + name: E2E_kind_multiversion-${{ matrix.kubernetes_version }} + runs-on: hugepage-runner + strategy: + matrix: + kubernetes_version: [v1.28.0,v1.27.0,v1.26.0] + steps: + - name: Set up Go + uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 + with: + go-version: 1.20.1 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - 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 -v ${{ matrix.kubernetes_version }} + - name: deploy_multus + run: source ./ci/ci.sh && deploy_multus + - name: vpp_e2e_test + run: source ./ci/ci.sh && vpp_e2e_test + - name: build_ovs_container + run: source ./ci/ci.sh && build_ovs_container + - name: build_test-pmd_container + run: source ./ci/ci.sh && build_testpmd_container + - name: ovs_e2e_test + run: source ./ci/ci.sh && ovs_e2e_test diff --git a/ci/ci.sh b/ci/ci.sh index c2ac4efc..f5432175 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -32,9 +32,13 @@ wget -q https://dl.k8s.io/release/v1.27.3/bin/linux/amd64/kubectl -O /home/runne chmod +x /home/runner/go/bin/kubectl } - create_kind_cluster(){ -kind create cluster +kubectl_version="v1.27.3" +case "$1" in + -v | --version ) kubectl_version="$2"; +esac + +kind create cluster --image "kindest/node:$kubectl_version" kubectl get all --all-namespaces #docker run -itd --device=/dev/hugepages:/dev/hugepages --privileged -v "$(pwd)/docker/vpp-centos-userspace-cni/:/etc/vpp/" --name vpp ligato/vpp-base @@ -138,7 +142,7 @@ run_all(){ # it gives much better logging breakdown on github # the run_all function is only used for manual deployment install_go_kubectl_kind -create_kind_cluster +create_kind_cluster -v v1.27.3 deploy_multus vpp_e2e_test build_ovs_container