Skip to content

Commit

Permalink
update Makefile (#4472)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian authored Sep 9, 2024
1 parent 8220194 commit 78b7279
Show file tree
Hide file tree
Showing 3 changed files with 419 additions and 204 deletions.
94 changes: 55 additions & 39 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ concurrency:

env:
GO_VERSION: ''
KIND_VERSION: v0.22.0
GOSEC_VERSION: '2.19.0'
HELM_VERSION: v3.14.0
SUBMARINER_VERSION: '0.16.3'
KIND_VERSION: v0.24.0
GOSEC_VERSION: '2.20.0'
HELM_VERSION: v3.15.4
SUBMARINER_VERSION: '0.18.0'

jobs:
build-kube-ovn-base:
Expand Down Expand Up @@ -516,7 +516,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -683,7 +683,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -836,7 +836,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -970,7 +970,7 @@ jobs:
fi
- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1127,7 +1127,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1222,7 +1222,7 @@ jobs:
done
- name: Cleanup
run: sh -x dist/images/cleanup.sh
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

kube-ovn-ic-conformance-e2e:
name: Kube-OVN IC Conformance E2E
Expand Down Expand Up @@ -1291,7 +1291,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1417,7 +1417,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1493,7 +1493,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1539,7 +1539,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1569,7 +1569,7 @@ jobs:
run: make check-kube-ovn-pod-restarts

- name: Cleanup
run: sh -x dist/images/cleanup.sh
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

no-ovn-lb-test:
name: Disable OVN LB Test
Expand All @@ -1590,7 +1590,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1622,7 +1622,7 @@ jobs:
run: make check-kube-ovn-pod-restarts

- name: Cleanup
run: sh -x dist/images/cleanup.sh
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

no-np-test:
name: Disable Network Policy Test
Expand All @@ -1643,7 +1643,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1675,7 +1675,7 @@ jobs:
run: make check-kube-ovn-pod-restarts

- name: Cleanup
run: sh -x dist/images/cleanup.sh
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

lb-svc-e2e:
name: LB Service E2E
Expand Down Expand Up @@ -1738,7 +1738,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1845,7 +1845,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1918,7 +1918,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -1964,7 +1964,7 @@ jobs:
run: make check-kube-ovn-pod-restarts

- name: Cleanup
run: sh -x dist/images/cleanup.sh
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

cilium-chaining-e2e:
name: Cilium Chaining E2E
Expand All @@ -1973,6 +1973,16 @@ jobs:
- build-e2e-binaries
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
ip-family:
- ipv4
# - ipv6
# - dual
mode:
- overlay
- underlay
steps:
- uses: jlumbroso/[email protected]
with:
Expand All @@ -1985,7 +1995,7 @@ jobs:
swap-storage: false

- uses: actions/checkout@v4
- uses: azure/setup-helm@v4.0.0
- uses: azure/setup-helm@v4.2.0
with:
version: '${{ env.HELM_VERSION }}'

Expand All @@ -2009,9 +2019,13 @@ jobs:
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
fi
- name: Remove DNS search domain
- name: Configure docker
run: |
# enable addition of ip6tables rules
sudo sh -c "echo '{\"experimental\": true, \"ip6tables\": true}' > /etc/docker/daemon.json"
# remove DNS search domain
sudo sed -i '/^search/d' /etc/resolv.conf
# restart docker
sudo systemctl restart docker
- uses: actions/setup-go@v5
Expand All @@ -2034,7 +2048,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand All @@ -2055,41 +2069,43 @@ jobs:
run: |
sudo pip3 install j2cli
sudo pip3 install "j2cli[yaml]"
sudo PATH=~/.local/bin:$PATH make kind-init
sudo PATH=~/.local/bin:$PATH make kind-init-cilium-chaining-${{ matrix.ip-family }}
sudo cp -r /root/.kube/ ~/.kube/
sudo chown -R $(id -un). ~/.kube/
- name: Install Kube-OVN with Cilium chaining
id: install
run: make kind-install-cilium-chaining
run: make kind-install-cilium-chaining-${{ matrix.mode }}-${{ matrix.ip-family }}

- name: Run E2E
id: e2e
working-directory: ${{ env.E2E_DIR }}
env:
E2E_CILIUM_CHAINING: "true"
E2E_BRANCH: ${{ github.base_ref || github.ref_name }}
E2E_IP_FAMILY: ${{ matrix.ip-family }}
E2E_NETWORK_MODE: ${{ matrix.mode }}
run: make k8s-conformance-e2e

- name: kubectl ko log
if: failure()
if: failure() && steps.e2e.conclusion == 'failure'
run: |
make kubectl-ko-log
mv kubectl-ko-log.tar.gz cilium-chaining-e2e-ko-log.tar.gz
mv kubectl-ko-log.tar.gz cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-ko-log.tar.gz
- name: upload kubectl ko log
uses: actions/upload-artifact@v4
if: failure()
if: failure() && steps.e2e.conclusion == 'failure'
with:
name: cilium-chaining-e2e-ko-log
path: cilium-chaining-e2e-ko-log.tar.gz
path: cilium-chaining-e2e-${{ matrix.mode }}-${{ matrix.ip-family }}-ko-log.tar.gz

- name: Check kube ovn pod restarts
if: ${{ success() || (failure() && (steps.install.conclusion == 'failure' || steps.e2e.conclusion == 'failure')) }}
run: make check-kube-ovn-pod-restarts

- name: Cleanup
run: sh -x dist/images/cleanup.sh
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

kube-ovn-ha-e2e:
name: Kube-OVN HA E2E
Expand Down Expand Up @@ -2164,7 +2180,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -2223,7 +2239,7 @@ jobs:
run: make check-kube-ovn-pod-restarts

- name: Cleanup
run: sh -x dist/images/cleanup.sh
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

kube-ovn-submariner-conformance-e2e:
name: Kube-OVN Submariner Conformance E2E
Expand Down Expand Up @@ -2265,7 +2281,7 @@ jobs:
fi
- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -2319,7 +2335,7 @@ jobs:
run: make check-kube-ovn-pod-restarts

- name: Cleanup
run: sh -x dist/images/cleanup.sh
run: timeout -k 10 180 sh -x dist/images/cleanup.sh

iptables-vpc-nat-gw-conformance-e2e:
name: Iptables VPC NAT Gateway E2E
Expand Down Expand Up @@ -2382,7 +2398,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down Expand Up @@ -2502,7 +2518,7 @@ jobs:
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-

- name: Install kind
uses: helm/kind-action@v1.9.0
uses: helm/kind-action@v1.10.0
with:
version: ${{ env.KIND_VERSION }}
install_only: true
Expand Down
Loading

0 comments on commit 78b7279

Please sign in to comment.