KAAP-519: Download kubelet, kubectl and cri-tools binaries from k8s / cri repo not APT #447
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: e2e-suite | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ 'ci-*' ] | |
| paths-ignore: | |
| - '*.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - 'NOTICE' | |
| - 'PROJECT' | |
| - 'SECURITY_CONTACTS' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths-ignore: | |
| - '*.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - 'NOTICE' | |
| - 'PROJECT' | |
| - 'SECURITY_CONTACTS' | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| e2e: | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: ubuntu-22.04 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Wait for controller manager image build | |
| if: ${{ github.event_name != 'workflow_dispatch' }} | |
| id: wait | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bash .ci/wait-for-job.sh build-controller-manager.yml build-controller-manager "${{ github.event.pull_request.head.sha || github.sha }}" | |
| - name: Download controller manager image artifact | |
| if: ${{ github.event_name != 'workflow_dispatch' }} | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: controller-manager-image | |
| path: . | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| run-id: ${{ steps.wait.outputs.run_id }} | |
| - name: Load controller manager image | |
| if: ${{ github.event_name != 'workflow_dispatch' }} | |
| run: | | |
| docker load -i controller-manager-image.tar | |
| TAG=$(make tag) | |
| IMAGE=quay.io/platform9/cluster-api-provider-bringyourownhost/controller-manager | |
| docker tag "${IMAGE}:${TAG}" "${IMAGE}:dev" | |
| - name: Set up Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: turn off swap | |
| run: sudo swapoff -a | |
| - name: Set netfilter conntrack max | |
| run: sudo sysctl -w net.netfilter.nf_conntrack_max=131072 | |
| # byohctl's real onboarding flow downloads a published agent .deb bundle from quay.io, tagged | |
| # to byohctl's own git-describe version -- a tag that only exists there for commits already on | |
| # main/ci-* (see .github/workflows/build-byohctl.yml). Building this branch's own bundle here | |
| # lets the byohctl e2e spec (test/e2e/e2e_byohctl_test.go) find it at build/pf9-byohost/debsrc/ | |
| # and serve it from a throwaway local registry itself (ensureLocalAgentBundleRegistry in | |
| # test/e2e/e2e_agent_bundle_registry.go), rather than skip or depend on a tag that doesn't | |
| # exist yet for this PR's own code. | |
| - name: Install fpm build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends ruby ruby-dev rubygems build-essential | |
| sudo gem install --no-document fpm | |
| - name: Build agent .deb bundle from this branch | |
| run: make build-host-agent-deb | |
| - name: Run e2e tests | |
| env: | |
| SKIP_BUILD: ${{ github.event_name != 'workflow_dispatch' && '1' || '' }} | |
| run: yes | GINKGO_NODES=3 make test-e2e | |
| - name: Upload e2e artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-artifacts | |
| path: _artifacts/ | |
| retention-days: 5 | |
| packaging: | |
| if: ${{ !github.event.pull_request.draft }} | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install rpmbuild | |
| run: sudo apt-get update && sudo apt-get install -y rpm | |
| - name: Install fpm build dependencies | |
| run: | | |
| sudo apt-get install -y --no-install-recommends ruby ruby-dev rubygems build-essential | |
| sudo gem install --no-document fpm | |
| - name: Run packaging tests | |
| run: make test-packaging | |