Skip to content

Commit

Permalink
ci: fix scheduled vpc nat gateway e2e (#2692)
Browse files Browse the repository at this point in the history
* ci: fix scheduled vpc nat gateway e2e

* ci: bump various versions
  • Loading branch information
zhangzujian committed Apr 21, 2023
1 parent d469235 commit b59bfd3
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 99 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:

env:
GOSEC_VERSION: '2.15.0'
HELM_VERSION: v3.11.1
HELM_VERSION: v3.11.3
SUBMARINER_VERSION: '0.14.3'

jobs:
Expand Down Expand Up @@ -1112,7 +1112,7 @@ jobs:
run: make kube-ovn-lb-svc-conformance-e2e

kubevirt-e2e:
name: Kubevirt vm E2E
name: Kubevirt VM E2E
needs:
- build-kube-ovn
- build-e2e-binaries
Expand Down Expand Up @@ -1311,7 +1311,7 @@ jobs:
run: |
sudo pip3 install j2cli
sudo pip3 install "j2cli[yaml]"
sudo PATH=~/.local/bin:$PATH k8s_version=v1.23.13 make kind-init
sudo PATH=~/.local/bin:$PATH k8s_version=v1.23.17 make kind-init
sudo cp -r /root/.kube/ ~/.kube/
sudo chown -R $(id -un). ~/.kube/
Expand Down Expand Up @@ -1564,6 +1564,9 @@ jobs:
- cyclonus-netpol-e2e
- kube-ovn-conformance-e2e
- kube-ovn-ic-conformance-e2e
- ovn-vpc-nat-gw-conformance-e2e
- iptables-vpc-nat-gw-conformance-e2e
- webhook-e2e
- lb-svc-e2e
- underlay-logical-gateway-installation-test
- chart-installation-test
Expand Down Expand Up @@ -1723,7 +1726,7 @@ jobs:
run: sh dist/images/cleanup.sh

iptables-vpc-nat-gw-conformance-e2e:
name: Iptables vpc nat gw E2E
name: Iptables VPC NAT Gateway E2E
needs:
- build-kube-ovn
- build-vpc-nat-gateway
Expand Down Expand Up @@ -1814,7 +1817,7 @@ jobs:
run: make iptables-vpc-nat-gw-conformance-e2e

ovn-vpc-nat-gw-conformance-e2e:
name: Ovn vpc nat gw E2E
name: OVN VPC NAT Gateway E2E
needs:
- build-kube-ovn
- build-e2e-binaries
Expand Down Expand Up @@ -1876,8 +1879,7 @@ jobs:
name: kube-ovn

- name: Load images
run: |
docker load -i kube-ovn.tar
run: docker load -i kube-ovn.tar

- name: Create kind cluster
run: |
Expand Down
142 changes: 53 additions & 89 deletions .github/workflows/scheduled-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
HELM_VERSION: v3.11.1
HELM_VERSION: v3.11.3
SUBMARINER_VERSION: '0.14.3'

jobs:
Expand Down Expand Up @@ -751,7 +751,7 @@ jobs:
run: make kube-ovn-lb-svc-conformance-e2e

kubevirt-e2e:
name: Kubevirt vm E2E
name: Kubevirt VM E2E
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
Expand Down Expand Up @@ -1273,79 +1273,54 @@ jobs:
run: sh dist/images/cleanup.sh

iptables-vpc-nat-gw-conformance-e2e:
name: Iptables vpc nat gw E2E
needs:
- build-kube-ovn
- build-vpc-nat-gateway
- build-e2e-binaries
name: Iptables VPC NAT Gateway E2E
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
branch:
- master
steps:
- uses: actions/checkout@v3

- name: Create the default branch directory
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
run: mkdir -p test/e2e/source

- name: Check out the default branch
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.repository.default_branch }}
fetch-depth: 1
path: test/e2e/source

- name: Export E2E directory
run: |
if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then
echo "E2E_DIR=." >> "$GITHUB_ENV"
else
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
fi
- uses: actions/setup-go@v4
with:
go-version-file: ${{ env.E2E_DIR }}/go.mod
go-version-file: go.mod
check-latest: true
cache: false

- name: Export Go full version
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"

- name: Go cache
uses: actions/cache/restore@v3
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Create branch directory
run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }}

- name: Check out branch
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
fetch-depth: 1
path: test/e2e/kube-ovn/branches/${{ matrix.branch }}

- name: Install kind
uses: helm/kind-action@v1
with:
install_only: true

- name: Install ginkgo
working-directory: ${{ env.E2E_DIR }}
run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo

- name: Download kube-ovn image
uses: actions/download-artifact@v3
with:
name: kube-ovn

- name: Download vpc-nat-gateway image
uses: actions/download-artifact@v3
with:
name: vpc-nat-gateway

- name: Load images
run: |
docker load -i kube-ovn.tar
docker load -i vpc-nat-gateway.tar
- name: Create kind cluster
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
sudo pip3 install j2cli
sudo pip3 install "j2cli[yaml]"
Expand All @@ -1354,82 +1329,68 @@ jobs:
sudo chown -R $(id -un). ~/.kube/
- name: Install Kube-OVN
run: make kind-install
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
version=$(grep -E '^VERSION="v([0-9]+\.){2}[0-9]+"$' dist/images/install.sh | head -n1 | awk -F= '{print $2}' | tr -d '"')
docker pull kubeovn/kube-ovn:$version
docker pull kubeovn/vpc-nat-gateway:$version
VERSION=$version make kind-install
- name: Install vpc-nat-gw
run: make kind-install-vpc-nat-gw

- name: Run E2E
working-directory: ${{ env.E2E_DIR }}
run: make iptables-vpc-nat-gw-conformance-e2e

ovn-vpc-nat-gw-conformance-e2e:
name: Ovn vpc nat gw E2E
needs:
- build-kube-ovn
- build-e2e-binaries
name: OVN VPC NAT Gateway E2E
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
branch:
- master
steps:
- uses: actions/checkout@v3

- name: Create the default branch directory
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
run: mkdir -p test/e2e/source

- name: Check out the default branch
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.repository.default_branch }}
fetch-depth: 1
path: test/e2e/source

- name: Export E2E directory
run: |
if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then
echo "E2E_DIR=." >> "$GITHUB_ENV"
else
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
fi
- uses: actions/setup-go@v4
with:
go-version-file: ${{ env.E2E_DIR }}/go.mod
go-version-file: go.mod
check-latest: true
cache: false

- name: Export Go full version
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"

- name: Go cache
uses: actions/cache/restore@v3
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
key: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Create branch directory
run: mkdir -p test/e2e/kube-ovn/branches/${{ matrix.branch }}

- name: Check out branch
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
fetch-depth: 1
path: test/e2e/kube-ovn/branches/${{ matrix.branch }}

- name: Install kind
uses: helm/kind-action@v1
with:
install_only: true

- name: Install ginkgo
working-directory: ${{ env.E2E_DIR }}
run: go install -v -mod=mod github.com/onsi/ginkgo/v2/ginkgo

- name: Download kube-ovn image
uses: actions/download-artifact@v3
with:
name: kube-ovn

- name: Load images
run: |
docker load -i kube-ovn.tar
- name: Create kind cluster
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
sudo pip3 install j2cli
sudo pip3 install "j2cli[yaml]"
Expand All @@ -1438,8 +1399,11 @@ jobs:
sudo chown -R $(id -un). ~/.kube/
- name: Install Kube-OVN
run: make kind-install
working-directory: test/e2e/kube-ovn/branches/${{ matrix.branch }}
run: |
version=$(grep -E '^VERSION="v([0-9]+\.){2}[0-9]+"$' dist/images/install.sh | head -n1 | awk -F= '{print $2}' | tr -d '"')
docker pull kubeovn/kube-ovn:$version
VERSION=$version make kind-install
- name: Run E2E
working-directory: ${{ env.E2E_DIR }}
run: make ovn-vpc-nat-gw-conformance-e2e
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CHART_UPGRADE_RESTART_OVS=$(shell echo $${CHART_UPGRADE_RESTART_OVS:-false})
MULTUS_IMAGE = ghcr.io/k8snetworkplumbingwg/multus-cni:snapshot-thick
MULTUS_YAML = https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/deployments/multus-daemonset-thick.yml

KUBEVIRT_VERSION = v0.58.0
KUBEVIRT_VERSION = v0.58.1
KUBEVIRT_OPERATOR_IMAGE = quay.io/kubevirt/virt-operator:$(KUBEVIRT_VERSION)
KUBEVIRT_API_IMAGE = quay.io/kubevirt/virt-api:$(KUBEVIRT_VERSION)
KUBEVIRT_CONTROLLER_IMAGE = quay.io/kubevirt/virt-controller:$(KUBEVIRT_VERSION)
Expand All @@ -35,10 +35,10 @@ KUBEVIRT_OPERATOR_YAML = https://github.com/kubevirt/kubevirt/releases/download/
KUBEVIRT_CR_YAML = https://github.com/kubevirt/kubevirt/releases/download/$(KUBEVIRT_VERSION)/kubevirt-cr.yaml
KUBEVIRT_TEST_YAML = https://kubevirt.io/labs/manifests/vm.yaml

CILIUM_VERSION = 1.12.7
CILIUM_VERSION = 1.12.9
CILIUM_IMAGE_REPO = quay.io/cilium/cilium

CERT_MANAGER_VERSION = v1.11.0
CERT_MANAGER_VERSION = v1.11.1
CERT_MANAGER_CONTROLLER = quay.io/jetstack/cert-manager-controller:$(CERT_MANAGER_VERSION)
CERT_MANAGER_CAINJECTOR = quay.io/jetstack/cert-manager-cainjector:$(CERT_MANAGER_VERSION)
CERT_MANAGER_WEBHOOK = quay.io/jetstack/cert-manager-webhook:$(CERT_MANAGER_VERSION)
Expand Down

0 comments on commit b59bfd3

Please sign in to comment.