Update module github.com/sirupsen/logrus to v1.10.1 (main) #40957
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Kind | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| - feature/* | |
| push: | |
| branches: | |
| - main | |
| - release-* | |
| - feature/* | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| check-changes: | |
| name: Check whether tests need to be run based on diff | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| show-progress: false | |
| - uses: antrea-io/has-changes@v2 | |
| id: check_diff | |
| with: | |
| paths-ignore: docs/* ci/jenkins/* *.md hack/.notableofcontents plugins/* | |
| outputs: | |
| has_changes: ${{ steps.check_diff.outputs.has_changes }} | |
| build-antrea-coverage-image: | |
| name: Build Antrea image to be used for Kind e2e tests | |
| needs: check-changes | |
| if: ${{ needs.check-changes.outputs.has_changes == 'yes' }} | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| with: | |
| driver: docker | |
| - name: Build Antrea Docker image with code coverage support | |
| run: | | |
| ./hack/build-antrea-linux-all.sh --pull --coverage | |
| - name: Save Antrea image to tarball | |
| run: docker save -o antrea-ubuntu.tar antrea/antrea-agent-ubuntu-coverage:latest antrea/antrea-controller-ubuntu-coverage:latest | |
| - name: Upload Antrea image for subsequent jobs | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: antrea-ubuntu-cov | |
| path: antrea-ubuntu.tar | |
| retention-days: 1 # minimum value, in case artifact deletion by 'artifact-cleanup' job fails | |
| build-flow-aggregator-coverage-image: | |
| name: Build Flow Aggregator image to be used for Kind e2e tests | |
| needs: check-changes | |
| if: ${{ needs.check-changes.outputs.has_changes == 'yes' }} | |
| runs-on: [ ubuntu-latest ] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - run: make flow-aggregator-ubuntu-coverage | |
| - name: Save Flow Aggregator image to tarball | |
| run: docker save -o flow-aggregator.tar antrea/flow-aggregator-coverage:latest | |
| - name: Upload Flow Aggregator image for subsequent jobs | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: flow-aggregator-cov | |
| path: flow-aggregator.tar | |
| retention-days: 1 # minimum value, in case artifact deletion by 'artifact-cleanup' job fails | |
| test-e2e-encap: | |
| name: E2e tests on a Kind cluster on Linux | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-encap-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-encap-coverage ./ci/kind/test-e2e-kind.sh --encap-mode encap --coverage | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-encap-coverage.tar.gz test-e2e-encap-coverage | |
| - name: Upload coverage for test-e2e-encap-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-encap-coverage | |
| path: test-e2e-encap-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-encap | |
| directory: test-e2e-encap-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-encap.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-encap-non-default: | |
| name: E2e tests on a Kind cluster on Linux with non default values (proxyAll=true, LoadBalancerMode=DSR, NodeIPAM=true) | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-encap-non-default-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-encap-non-default-coverage ./ci/kind/test-e2e-kind.sh \ | |
| --coverage \ | |
| --encap-mode encap \ | |
| --proxy-all \ | |
| --no-kube-proxy \ | |
| --feature-gates LoadBalancerModeDSR=true \ | |
| --load-balancer-mode dsr \ | |
| --node-ipam | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-encap-non-default-coverage.tar.gz test-e2e-encap-non-default-coverage | |
| - name: Upload coverage for test-e2e-encap-non-default-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-encap-non-default-coverage | |
| path: test-e2e-encap-non-default-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-encap-non-default | |
| directory: test-e2e-encap-non-default-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-encap-non-default.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-encap-all-features-enabled: | |
| name: E2e tests on a Kind cluster on Linux with all features enabled | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-encap-all-features-enabled-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-encap-all-features-enabled-coverage ./ci/kind/test-e2e-kind.sh \ | |
| --encap-mode encap \ | |
| --coverage \ | |
| --feature-gates AllAlpha=true,AllBeta=true \ | |
| --proxy-all \ | |
| --node-ipam \ | |
| --extra-vlan \ | |
| --multicast \ | |
| --bgp-policy \ | |
| --networkpolicy-evaluation | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-encap-all-features-enabled-coverage.tar.gz test-e2e-encap-all-features-enabled-coverage | |
| - name: Upload coverage for test-e2e-encap-all-features-enabled-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-encap-all-features-enabled-coverage | |
| path: test-e2e-encap-all-features-enabled-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-encap-all-features-enabled | |
| directory: test-e2e-encap-all-features-enabled-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-encap-all-features-enabled.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-ipam-feature-enabled: | |
| name: E2e tests on a Kind cluster on Linux with FlexibleIPAM feature enabled | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [oracle-vm-4cpu-16gb-x86-64] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| free-disk-space: 'false' | |
| - name: Run ipam e2e tests | |
| # We enable multicast as some FlexibleIPAM e2e tests require it | |
| run: | | |
| mkdir log | |
| mkdir test-ipam-e2e-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-ipam-e2e-coverage ./ci/kind/test-e2e-kind.sh \ | |
| --encap-mode noEncap \ | |
| --coverage \ | |
| --skip mode-irrelevant \ | |
| --multicast \ | |
| --flexible-ipam \ | |
| - name: Tar coverage files | |
| run: tar -czf test-ipam-e2e-coverage.tar.gz test-ipam-e2e-coverage | |
| - name: Upload coverage for test-ipam-e2e-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-ipam-e2e-coverage | |
| path: test-ipam-e2e-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: test-ipam-e2e-coverage | |
| directory: test-ipam-e2e-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-ipam-features-enabled.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-noencap: | |
| name: E2e tests on a Kind cluster on Linux (noEncap) | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-noencap-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-noencap-coverage ./ci/kind/test-e2e-kind.sh --encap-mode noEncap --coverage --skip mode-irrelevant | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-noencap-coverage.tar.gz test-e2e-noencap-coverage | |
| - name: Upload coverage for test-e2e-noencap-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-noencap-coverage | |
| path: test-e2e-noencap-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-noencap | |
| directory: test-e2e-noencap-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-noencap.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-hybrid: | |
| name: E2e tests on a Kind cluster on Linux (hybrid) | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-hybrid-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-hybrid-coverage ./ci/kind/test-e2e-kind.sh --encap-mode hybrid --coverage --skip mode-irrelevant | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-hybrid-coverage.tar.gz test-e2e-hybrid-coverage | |
| - name: Upload coverage for test-e2e-hybrid-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-hybrid-coverage | |
| path: test-e2e-hybrid-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-hybrid | |
| directory: test-e2e-hybrid-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-hybrid.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-wireguard: | |
| name: E2e tests on a Kind cluster on Linux with WireGuard encryption | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-wireguard-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-wireguard-coverage ./ci/kind/test-e2e-kind.sh \ | |
| --encap-mode encap --coverage \ | |
| --traffic-encryption-mode wireguard \ | |
| --skip mode-irrelevant \ | |
| --setup-only | |
| - name: Run antctl check installation | |
| run: | | |
| make antctl | |
| ./bin/antctl check installation --run wireguard | |
| - name: Cleanup Kind cluster | |
| if: ${{ always() }} | |
| run: ./ci/kind/test-e2e-kind.sh --cleanup-only | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-wireguard-coverage.tar.gz test-e2e-wireguard-coverage | |
| - name: Upload coverage for test-e2e-wireguard-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-wireguard-coverage | |
| path: test-e2e-wireguard-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-wireguard | |
| directory: test-e2e-wireguard-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-wireguard.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-ipv6-only: | |
| name: E2e tests on a Kind cluster on Linux (IPv6 only) | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-ipv6-only-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-ipv6-only-coverage ./ci/kind/test-e2e-kind.sh --encap-mode encap --ip-family v6 --coverage | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-ipv6-only-coverage.tar.gz test-e2e-ipv6-only-coverage | |
| - name: Upload coverage for test-e2e-ipv6-only-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-ipv6-only-coverage | |
| path: test-e2e-ipv6-only-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-ipv6-only | |
| directory: test-e2e-ipv6-only-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-ipv6-only.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-ipv6-ds: | |
| name: E2e tests on a Kind cluster on Linux (Dual-stack) | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-ipv6-ds-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-ipv6-ds-coverage ./ci/kind/test-e2e-kind.sh --encap-mode encap --ip-family dual --coverage | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-ipv6-ds-coverage.tar.gz test-e2e-ipv6-ds-coverage | |
| - name: Upload coverage for test-e2e-ipv6-ds-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-ipv6-ds-coverage | |
| path: test-e2e-ipv6-ds-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-ipv6-ds | |
| directory: test-e2e-ipv6-ds-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-ipv6-ds.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-hybrid-non-default: | |
| name: E2e tests on a Kind cluster on Linux (hybrid) with non default values (proxyAll=true, kube-proxy-mode=nftables) | |
| needs: [ build-antrea-coverage-image ] | |
| runs-on: [ ubuntu-latest ] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-hybrid-non-default-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-hybrid-non-default-coverage ./ci/kind/test-e2e-kind.sh \ | |
| --encap-mode hybrid \ | |
| --coverage \ | |
| --proxy-all \ | |
| --host-network-mode nftables \ | |
| --kube-proxy-mode nftables \ | |
| --feature-gates NFTablesHostNetworkMode=true \ | |
| --skip mode-irrelevant | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-hybrid-non-default-coverage.tar.gz test-e2e-hybrid-non-default-coverage | |
| - name: Upload coverage for test-e2e-hybrid-non-default-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-hybrid-non-default-coverage | |
| path: test-e2e-hybrid-non-default-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-non-default-noencap | |
| directory: test-e2e-hybrid-non-default-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-hybrid-non-default.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-flow-visibility: | |
| name: E2e tests on a Kind cluster on Linux for Flow Visibility | |
| needs: [build-antrea-coverage-image, build-flow-aggregator-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| strategy: | |
| matrix: | |
| protocol: [grpc, ipfix] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| load-flow-aggregator: 'true' | |
| - name: Run e2e tests | |
| run: | | |
| mkdir log | |
| mkdir test-e2e-fa-${{ matrix.protocol }}-coverage | |
| ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-fa-${{ matrix.protocol }}-coverage ./ci/kind/test-e2e-kind.sh --encap-mode encap --coverage --flow-visibility --flow-visibility-protocol ${{ matrix.protocol }} --ip-family dual | |
| - name: Tar coverage files | |
| run: tar -czf test-e2e-fa-${{ matrix.protocol }}-coverage.tar.gz test-e2e-fa-${{ matrix.protocol }}-coverage | |
| - name: Upload coverage for test-e2e-fa-${{ matrix.protocol }}-coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-e2e-fa-${{ matrix.protocol }}-coverage | |
| path: test-e2e-fa-${{ matrix.protocol }}-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-e2e-fa | |
| directory: test-e2e-fa-${{ matrix.protocol }}-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: e2e-kind-fa-${{ matrix.protocol }}.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-multicluster-e2e: | |
| name: Multi-cluster e2e tests on Kind clusters | |
| needs: [check-changes] | |
| if: ${{ needs.check-changes.outputs.has_changes == 'yes' }} | |
| runs-on: [ubuntu-latest-8-cores] | |
| timeout-minutes: 150 | |
| env: | |
| GIT_COMMIT: ${{ github.sha }} | |
| WORKSPACE: ${{ github.workspace }} | |
| steps: | |
| - name: Free disk space (extended) | |
| # Multi-cluster e2e builds Antrea and the multi-cluster controller, then runs three Kind clusters. | |
| run: | | |
| sudo apt-get clean | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| sudo rm -rf "/usr/local/lib/android" | |
| df -h | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: '.go-version' | |
| - uses: ./.github/actions/setup-docker-classic | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| with: | |
| driver: docker | |
| - uses: ./.github/actions/setup-kind | |
| - name: Run multi-cluster e2e tests | |
| run: | | |
| mkdir -p "$HOME/.kube" | |
| ./ci/jenkins/test-mc.sh \ | |
| --testcase e2e \ | |
| --registry "$(head -n1 ci/docker-registry)" \ | |
| --mc-gateway \ | |
| --coverage \ | |
| --kind \ | |
| --use-system-go \ | |
| --workdir "$GITHUB_WORKSPACE" \ | |
| --kubeconfigs-path "$HOME/.kube" | |
| - name: Tar coverage files | |
| run: tar -czf mc-e2e-coverage.tar.gz mc-e2e-coverage | |
| - name: Upload coverage for test-multicluster-e2e | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-multicluster-e2e-coverage | |
| path: mc-e2e-coverage.tar.gz | |
| retention-days: 30 | |
| - name: Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/*.cov.out' | |
| disable_search: true | |
| flags: kind-e2e-tests | |
| name: codecov-test-multicluster-e2e | |
| directory: mc-e2e-coverage | |
| fail_ci_if_error: ${{ github.event_name == 'push' }} | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: multicluster-e2e-kind.tar.gz | |
| path: antrea-test-logs.tar.gz | |
| retention-days: 30 | |
| test-network-policy-conformance-encap: | |
| name: NetworkPolicy conformance tests on a Kind cluster on Linux | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| tag-coverage-images: 'true' | |
| - name: Run NetworkPolicy conformance tests | |
| run: | | |
| mkdir log | |
| ANTREA_LOG_DIR=$PWD/log ./ci/kind/test-netpol-v2-conformance-kind.sh | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: networkpolicy-conformance-kind-encap.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-secondary-network: | |
| name: Antrea-native (VLAN) secondary network tests on a Kind cluster on Linux | |
| needs: [build-antrea-coverage-image] | |
| runs-on: [ubuntu-latest-8-cores] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| tag-coverage-images: 'true' | |
| - name: Run secondary network tests | |
| run: | | |
| mkdir log | |
| ANTREA_LOG_DIR=$PWD/log ./ci/kind/test-secondary-network-kind.sh | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: secondary-network.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-e2e-conformance: | |
| name: K8s e2e conformance tests | |
| needs: build-antrea-coverage-image | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| setup-go: 'false' | |
| tag-coverage-images: 'true' | |
| - name: Create K8s cluster | |
| run: | | |
| ./ci/kind/kind-setup.sh create kind | |
| - name: Install Antrea | |
| run: | | |
| helm_args=() | |
| helm_repo="./build/charts/antrea" | |
| helm_args+=(--set controllerImage.repository="antrea/antrea-controller-ubuntu") | |
| helm_args+=(--set agentImage.repository="antrea/antrea-agent-ubuntu") | |
| helm install --namespace kube-system antrea ${helm_repo} "${helm_args[@]}" | |
| kubectl rollout status -n kube-system ds/antrea-agent --timeout=5m | |
| - name: Run e2e conformance tests | |
| run: | | |
| ./ci/run-k8s-e2e-tests.sh --e2e-conformance | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: sonobuoy-conformance.tar.gz | |
| path: "*_sonobuoy_*.tar.gz" | |
| retention-days: 7 | |
| test-upgrade-from-N-1: | |
| name: Upgrade from Antrea version N-1 | |
| needs: build-antrea-coverage-image | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| tag-coverage-images: 'true' | |
| - name: Run test | |
| run: | | |
| mkdir log | |
| ANTREA_LOG_DIR=$PWD/log ./ci/kind/test-upgrade-antrea.sh --from-version-n-minus 1 | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: upgrade-from-antrea-version-n-1.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-upgrade-from-N-2: | |
| name: Upgrade from Antrea version N-2 | |
| needs: build-antrea-coverage-image | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| tag-coverage-images: 'true' | |
| - name: Run test | |
| run: | | |
| mkdir log | |
| ANTREA_LOG_DIR=$PWD/log ./ci/kind/test-upgrade-antrea.sh --from-version-n-minus 2 | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: upgrade-from-antrea-version-n-2.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-compatible-N-1: | |
| name: API compatible with client version N-1 | |
| needs: build-antrea-coverage-image | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| tag-coverage-images: 'true' | |
| - name: Run test | |
| run: | | |
| mkdir log | |
| ANTREA_LOG_DIR=$PWD/log ./ci/kind/test-upgrade-antrea.sh --from-version-n-minus 1 --controller-only | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: api-compatible-with-client-version-n-1.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| test-compatible-N-2: | |
| name: API compatible with client version N-2 | |
| needs: build-antrea-coverage-image | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| tag-coverage-images: 'true' | |
| - name: Run test | |
| run: | | |
| mkdir log | |
| ANTREA_LOG_DIR=$PWD/log ./ci/kind/test-upgrade-antrea.sh --from-version-n-minus 2 --controller-only | |
| - name: Tar log files | |
| if: ${{ failure() }} | |
| run: tar -czf log.tar.gz log | |
| - name: Upload test log | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ failure() }} | |
| with: | |
| name: api-compatible-with-client-version-n-2.tar.gz | |
| path: log.tar.gz | |
| retention-days: 30 | |
| run-installation-checks: | |
| name: Test installation using 'antctl check' command | |
| needs: [ build-antrea-coverage-image ] | |
| runs-on: [ ubuntu-latest ] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| - name: Create Kind Cluster | |
| run: | | |
| ./ci/kind/kind-setup.sh create kind --ip-family dual | |
| - name: Build antctl binary | |
| run: | | |
| make antctl-linux | |
| - name: Run Pre checks | |
| run: | | |
| ./bin/antctl-linux check cluster | |
| - name: Deploy Antrea | |
| run: | | |
| kubectl apply -f build/yamls/antrea.yml | |
| kubectl rollout status --timeout=1m deployment/antrea-controller -n kube-system | |
| kubectl rollout status --timeout=1m daemonset/antrea-agent -n kube-system | |
| - name: Run Post checks | |
| run: | | |
| ./bin/antctl-linux check installation | |
| validate-prometheus-metrics-doc: | |
| name: Validate metrics in Prometheus document match running deployment's | |
| needs: build-antrea-coverage-image | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| show-progress: false | |
| - uses: ./.github/actions/setup-kind-test | |
| with: | |
| setup-go: 'false' | |
| tag-coverage-images: 'true' | |
| - name: Validate document | |
| run: | | |
| ./ci/kind/validate-metrics-doc.sh | |
| # Runs after all other jobs in the workflow succeed and deletes Antrea Docker images uploaded as temporary | |
| # artifacts. There is no simple way to delete an artifact from a worfklow triggered by a pull | |
| # request, so instead we use the upload-artifact action again, and overwrite the previous artifact | |
| # (which is very large) with an empty file. | |
| artifact-cleanup: | |
| name: Delete uploaded images | |
| needs: | |
| - build-antrea-coverage-image | |
| - build-flow-aggregator-coverage-image | |
| - test-e2e-encap | |
| - test-e2e-encap-non-default | |
| - test-e2e-encap-all-features-enabled | |
| - test-e2e-noencap | |
| - test-e2e-hybrid | |
| - test-e2e-hybrid-non-default | |
| - test-e2e-wireguard | |
| - test-e2e-ipv6-only | |
| - test-e2e-ipv6-ds | |
| - test-e2e-ipam-feature-enabled | |
| - test-upgrade-from-N-1 | |
| - test-upgrade-from-N-2 | |
| - test-compatible-N-1 | |
| - test-compatible-N-2 | |
| - validate-prometheus-metrics-doc | |
| - test-e2e-flow-visibility | |
| - test-network-policy-conformance-encap | |
| - test-secondary-network | |
| - test-e2e-conformance | |
| - test-multicluster-e2e | |
| - run-installation-checks | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - name: Create empty file to overwrite artifacts | |
| run: | | |
| touch empty-artifact | |
| - name: Delete antrea-ubuntu-cov | |
| if: ${{ needs.build-antrea-coverage-image.result == 'success' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: antrea-ubuntu-cov | |
| path: empty-artifact | |
| retention-days: 1 # minimum value | |
| overwrite: true | |
| - name: Delete flow-aggregator | |
| if: ${{ needs.build-flow-aggregator-coverage-image.result == 'success' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: flow-aggregator-cov | |
| path: empty-artifact | |
| retention-days: 1 # minimum value | |
| overwrite: true |