diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 02b6dda25..d92177e28 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 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 000000000..3b91f5f01 --- /dev/null +++ b/.github/workflows/run-k8s-tests-on-ppc64le.yaml @@ -0,0 +1,81 @@ +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: | + bash ${HOME}/scripts/prepare_runner.sh + sudo rm -rf $GITHUB_WORKSPACE/* + + - 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: Install golang + run: | + ./tests/install_go.sh -f -p + echo "/usr/local/go/bin" >> $GITHUB_PATH + + - name: Prepare the runner for k8s cluster creation + run: bash ${HOME}/scripts/k8s_cluster_cleanup.sh + + - name: Create k8s cluster using kubeadm + run: bash ${HOME}/scripts/k8s_cluster_create.sh + + - 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 + + - name: Delete cluster and post cleanup actions + run: bash ${HOME}/scripts/k8s_cluster_cleanup.sh diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index 717744aa5..86c7da7f9 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -261,6 +261,7 @@ function main() { get-cluster-credentials) get_cluster_credentials ;; deploy-kata-aks) deploy_kata "aks" ;; deploy-kata-kcli) deploy_kata "kcli" ;; + deploy-kata-kubeadm) deploy_kata "kubeadm" ;; deploy-kata-sev) deploy_kata "sev" ;; deploy-kata-snp) deploy_kata "snp" ;; deploy-kata-tdx) deploy_kata "tdx" ;;