From 13027d28d858c39c180358acc557d61cc04abea5 Mon Sep 17 00:00:00 2001 From: Amulyam24 Date: Thu, 18 Jan 2024 10:32:22 +0530 Subject: [PATCH] k8s-workflow-ppc --- .github/workflows/ci.yaml | 21 +++--- .../publish-kata-deploy-payload-ppc64le.yaml | 2 +- .../workflows/run-k8s-tests-on-ppc64le.yaml | 69 +++++++++++++++++++ .github/workflows/static-checks.yaml | 1 - 4 files changed, 82 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/run-k8s-tests-on-ppc64le.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 02b6dda2597c..d1786a0c3ec0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,7 +69,7 @@ jobs: with: tarball-suffix: -${{ inputs.tag }} registry: ghcr.io - repo: ${{ github.repository_owner }}/kata-deploy-ci + repo: amulyam24/kata-deploy-ci tag: ${{ inputs.tag }}-ppc64le commit-hash: ${{ inputs.commit-hash }} target-branch: ${{ inputs.target-branch }} @@ -202,6 +202,17 @@ jobs: commit-hash: ${{ inputs.commit-hash }} pr-number: ${{ inputs.pr-number }} target-branch: ${{ inputs.target-branch }} + + run-k8s-tests-on-ppc64le: + needs: publish-kata-deploy-payload-ppc64le + uses: ./.github/workflows/run-k8s-tests-on-ppc64le.yaml + with: + registry: ghcr.io + repo: ${{ github.repository_owner }}/kata-deploy-ci + tag: ${{ inputs.tag }}-ppc64le + commit-hash: ${{ inputs.commit-hash }} + pr-number: ${{ inputs.pr-number }} + target-branch: ${{ inputs.target-branch }} run-metrics-tests: needs: build-kata-static-tarball-amd64 @@ -226,11 +237,3 @@ jobs: tarball-suffix: -${{ inputs.tag }} commit-hash: ${{ inputs.commit-hash }} target-branch: ${{ inputs.target-branch }} - - run-cri-containerd-tests-ppc64le: - needs: build-kata-static-tarball-ppc64le - uses: ./.github/workflows/run-cri-containerd-tests-ppc64le.yaml - with: - tarball-suffix: -${{ inputs.tag }} - commit-hash: ${{ inputs.commit-hash }} - target-branch: ${{ inputs.target-branch }} diff --git a/.github/workflows/publish-kata-deploy-payload-ppc64le.yaml b/.github/workflows/publish-kata-deploy-payload-ppc64le.yaml index db03a0e6da58..69c29261df3c 100644 --- a/.github/workflows/publish-kata-deploy-payload-ppc64le.yaml +++ b/.github/workflows/publish-kata-deploy-payload-ppc64le.yaml @@ -67,4 +67,4 @@ jobs: run: | ./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \ $(pwd)/kata-static.tar.xz \ - ${{ inputs.registry }}/${{ inputs.repo }} ${{ inputs.tag }} + ghcr.io/amulyam24/kata-deploy-ci ${{ inputs.tag }} diff --git a/.github/workflows/run-k8s-tests-on-ppc64le.yaml b/.github/workflows/run-k8s-tests-on-ppc64le.yaml new file mode 100644 index 000000000000..89ccb4909967 --- /dev/null +++ b/.github/workflows/run-k8s-tests-on-ppc64le.yaml @@ -0,0 +1,69 @@ +name: CI | Run kubernetes tests on Power(ppc64le) +on: + workflow_call: + inputs: + registry: + required: true + type: string + repo: + required: true + type: string + tag: + required: true + type: string + pr-number: + required: true + type: string + commit-hash: + required: false + type: string + target-branch: + required: false + type: string + default: "" + +jobs: + run-k8s-tests: + strategy: + fail-fast: false + matrix: + vmm: + - qemu + k8s: + - kubeadm + runs-on: ppc64le + env: + DOCKER_REGISTRY: ${{ inputs.registry }} + DOCKER_REPO: ${{ inputs.repo }} + DOCKER_TAG: ${{ inputs.tag }} + PR_NUMBER: ${{ inputs.pr-number }} + KATA_HYPERVISOR: ${{ matrix.vmm }} + KUBERNETES: ${{ matrix.k8s }} + USING_NFD: "false" + TARGET_ARCH: "ppc64le" + steps: + # - name: Prepare the self-hosted runner + # run: ${HOME}/scripts/prepare_runner.sh + + - name: Set the KUBECONFIG for kubeadm + run: export KUBECONFIG="$HOME/.kube/config" + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.commit-hash }} + fetch-depth: 0 + + - name: Rebase atop of the latest target branch + run: | + ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" + env: + TARGET_BRANCH: ${{ inputs.target-branch }} + + - name: Deploy Kata + timeout-minutes: 10 + run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-kubeadm + + - name: Run tests + timeout-minutes: 30 + run: bash tests/integration/kubernetes/gha-run.sh run-tests + + diff --git a/.github/workflows/static-checks.yaml b/.github/workflows/static-checks.yaml index 0a23eb03a450..e5ed9ef591cb 100644 --- a/.github/workflows/static-checks.yaml +++ b/.github/workflows/static-checks.yaml @@ -81,7 +81,6 @@ jobs: - "ubuntu-20.04" - "arm-no-k8s" - "s390x" - - "ppc64le" runs-on: ${{ matrix.instance }} steps: - name: Adjust a permission for repo