diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 02b6dda2597c..da1b68d16020 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,7 +237,7 @@ 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 diff --git a/.github/workflows/publish-kata-deploy-payload-ppc64le.yaml b/.github/workflows/publish-kata-deploy-payload-ppc64le.yaml index db03a0e6da58..37e470bbcbd8 100644 --- a/.github/workflows/publish-kata-deploy-payload-ppc64le.yaml +++ b/.github/workflows/publish-kata-deploy-payload-ppc64le.yaml @@ -34,6 +34,9 @@ jobs: with: ref: ${{ inputs.commit-hash }} fetch-depth: 0 + + - name: Prepare the self-hosted runner + run: ${HOME}/scripts/prepare_runner.sh - name: Rebase atop of the latest target branch run: | @@ -67,4 +70,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..7628064b7b92 --- /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: amulyam24 + 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 + 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 717744aa5c9b..83dceb35daf9 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -14,7 +14,7 @@ source "${kubernetes_dir}/../../gha-run-k8s-common.sh" tools_dir="${repo_root_dir}/tools" DOCKER_REGISTRY=${DOCKER_REGISTRY:-quay.io} -DOCKER_REPO=${DOCKER_REPO:-kata-containers/kata-deploy-ci} +DOCKER_REPO="amulyam24/kata-deploy-ci" DOCKER_TAG=${DOCKER_TAG:-kata-containers-latest} KATA_DEPLOY_WAIT_TIMEOUT=${KATA_DEPLOY_WAIT_TIMEOUT:-10m} KATA_HYPERVISOR=${KATA_HYPERVISOR:-qemu} @@ -266,6 +266,7 @@ function main() { deploy-kata-tdx) deploy_kata "tdx" ;; deploy-kata-garm) deploy_kata "garm" ;; deploy-kata-zvsi) deploy_kata "zvsi" ;; + deploy-kata-kubeadm) deploy_kata "kubeadm" ;; run-tests) run_tests ;; run-tests-kcli) run_tests "kcli" ;; cleanup-kcli) cleanup "kcli" ;;