From 2000e996c5cdc4cc923005094126324c29f98a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A5=96=E5=BB=BA?= Date: Tue, 23 Aug 2022 07:13:29 +0800 Subject: [PATCH] ci: switch environment to ubuntu-20.04 (#1838) --- .github/workflows/build-arm64-image.yaml | 2 +- .github/workflows/build-dpdk-image.yaml | 2 +- .github/workflows/build-x86-image.yaml | 145 +++++++++++--------- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/push-multiarch-image.yaml | 2 +- 6 files changed, 85 insertions(+), 70 deletions(-) diff --git a/.github/workflows/build-arm64-image.yaml b/.github/workflows/build-arm64-image.yaml index 970eeb188b9..b6558ef2bd6 100644 --- a/.github/workflows/build-arm64-image.yaml +++ b/.github/workflows/build-arm64-image.yaml @@ -17,7 +17,7 @@ on: jobs: build: name: Build arm64 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Set up Go 1.x uses: actions/setup-go@v2 diff --git a/.github/workflows/build-dpdk-image.yaml b/.github/workflows/build-dpdk-image.yaml index ca2ffb479c9..91bf1fc016f 100644 --- a/.github/workflows/build-dpdk-image.yaml +++ b/.github/workflows/build-dpdk-image.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch jobs: build: name: Build DPDK - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/build-x86-image.yaml b/.github/workflows/build-x86-image.yaml index b041d317c38..3962766911e 100644 --- a/.github/workflows/build-x86-image.yaml +++ b/.github/workflows/build-x86-image.yaml @@ -21,7 +21,7 @@ env: jobs: build: name: Build x86 - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -78,7 +78,7 @@ jobs: single-e2e: needs: build name: 1-master-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -92,8 +92,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init - name: Download image @@ -116,7 +116,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e - name: Cleanup @@ -127,7 +128,7 @@ jobs: single-iptables-e2e: needs: build name: 1-master-iptables-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -141,8 +142,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-iptables - name: Download image @@ -165,7 +166,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e - name: Cleanup @@ -176,7 +178,7 @@ jobs: single-vlan-e2e: needs: build name: 1-master-vlan-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -190,8 +192,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init - name: Download image @@ -214,7 +216,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e-vlan - name: Cleanup @@ -225,7 +228,7 @@ jobs: single-underlay-e2e-single-nic: needs: build name: 1-master-underlay-e2e-single-nic - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -239,8 +242,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init - name: Download image @@ -263,14 +266,15 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e-underlay-single-nic - name: Cleanup run: | sh -c 'while :; do if [ $(kubectl get --no-headers subnet | wc -l) -eq 2 ]; then break; fi; sleep 5; done' sh dist/images/cleanup.sh - + - name: Check Node Network run: | sh -c ' @@ -290,7 +294,7 @@ jobs: single-node-e2e: needs: build name: 1-node-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -304,8 +308,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-single - name: Download image @@ -328,7 +332,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e - name: Cleanup @@ -339,7 +344,7 @@ jobs: ha-e2e: needs: build name: 3-master-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -353,8 +358,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-ha - name: Download image @@ -370,7 +375,7 @@ jobs: ipv6-e2e: needs: build name: ipv6-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -384,8 +389,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-ipv6 - name: Download image @@ -412,7 +417,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e-ipv6 - name: Cleanup @@ -423,7 +429,7 @@ jobs: ipv6-vlan-e2e: needs: build name: ipv6-vlan-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -437,8 +443,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-ipv6 - name: Download image @@ -465,7 +471,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e-vlan-ipv6 - name: Cleanup @@ -476,7 +483,7 @@ jobs: ipv6-underlay-e2e-single-nic: needs: build name: ipv6-underlay-e2e-single-nic - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -490,8 +497,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-ipv6 - name: Download image @@ -518,7 +525,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e-underlay-single-nic - name: Cleanup @@ -545,7 +553,7 @@ jobs: dual-stack-e2e: needs: build name: dual-stack-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -559,8 +567,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-dual - name: Download image @@ -587,7 +595,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e - name: Cleanup @@ -598,7 +607,7 @@ jobs: dual-stack-underlay-e2e-single-nic: needs: build name: dual-stack-underlay-e2e-single-nic - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -612,8 +621,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-dual - name: Download image @@ -640,7 +649,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e-underlay-single-nic - name: Cleanup @@ -667,7 +677,7 @@ jobs: dual-stack-underlay-logical-gw-e2e: needs: build name: dual-stack-underlay-logical-gateway-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -681,8 +691,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-dual - name: Download image @@ -709,7 +719,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e - name: Cleanup @@ -736,7 +747,7 @@ jobs: no-lb-e2e: needs: build name: disable-loadbalancer-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -750,8 +761,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init - name: Download image @@ -776,7 +787,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e - name: Cleanup @@ -787,7 +799,7 @@ jobs: no-lb-iptables-e2e: needs: build name: disable-loadbalancer-iptables-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -801,8 +813,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-iptables - name: Download image @@ -827,7 +839,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e - name: Cleanup @@ -838,7 +851,7 @@ jobs: no-np-e2e: needs: build name: disable-network-policy-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -852,8 +865,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init - name: Download image @@ -878,7 +891,8 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info - sudo chmod 666 /home/runner/.kube/config + sudo cp -r /root/.kube/ /home/runner/.kube/ + sudo chmod -R 777 /home/runner/.kube/ make e2e - name: Cleanup @@ -889,7 +903,7 @@ jobs: ovnic-e2e: needs: build name: 1-master-ovnic-e2e - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 30 steps: - name: Check out code @@ -903,8 +917,8 @@ jobs: - name: Init Kind run: | - pip install j2cli --user - pip install "j2cli[yaml]" --user + sudo pip3 install j2cli + sudo pip3 install "j2cli[yaml]" sudo PATH=~/.local/bin:$PATH make kind-init-cluster - name: Download image @@ -928,6 +942,7 @@ jobs: run: | go install github.com/onsi/ginkgo/ginkgo@latest sudo kubectl cluster-info + sudo cp -r /root/.kube/ /home/runner/.kube/ sudo chmod -R 777 /home/runner/.kube/ make e2e-ovn-ic @@ -955,7 +970,7 @@ jobs: - no-np-e2e - ovnic-e2e name: push - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check out code uses: actions/checkout@v2 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6705b6e90ee..0aa7c86cfdf 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -17,7 +17,7 @@ on: jobs: analyze: name: Analyze - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 strategy: fail-fast: false diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 8c4af0395c5..da505bd6aea 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,7 +10,7 @@ on: jobs: golangci: name: lint - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: golangci-lint diff --git a/.github/workflows/push-multiarch-image.yaml b/.github/workflows/push-multiarch-image.yaml index 109882e15ff..a0679ce23d1 100644 --- a/.github/workflows/push-multiarch-image.yaml +++ b/.github/workflows/push-multiarch-image.yaml @@ -11,7 +11,7 @@ on: jobs: build: name: Push multi arch images - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory uses: actions/checkout@v2