mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 03:42:09 +00:00
> Double quote to prevent globbing and word splitting. Signed-off-by: stevenhorsman <steven@uk.ibm.com>
139 lines
4.2 KiB
YAML
139 lines
4.2 KiB
YAML
name: CI | Run kubernetes tests on IBM Cloud Z virtual server instance (zVSI)
|
|
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:
|
|
snapshotter:
|
|
- overlayfs
|
|
- devmapper
|
|
- nydus
|
|
vmm:
|
|
- qemu
|
|
- qemu-runtime-rs
|
|
- qemu-coco-dev
|
|
k8s:
|
|
- kubeadm
|
|
include:
|
|
- snapshotter: devmapper
|
|
pull-type: default
|
|
using-nfd: true
|
|
deploy-cmd: configure-snapshotter
|
|
- snapshotter: nydus
|
|
pull-type: guest-pull
|
|
using-nfd: false
|
|
deploy-cmd: deploy-snapshotter
|
|
exclude:
|
|
- snapshotter: overlayfs
|
|
vmm: qemu
|
|
- snapshotter: overlayfs
|
|
vmm: qemu-coco-dev
|
|
- snapshotter: devmapper
|
|
vmm: qemu-runtime-rs
|
|
- snapshotter: devmapper
|
|
vmm: qemu-coco-dev
|
|
- snapshotter: nydus
|
|
vmm: qemu
|
|
- snapshotter: nydus
|
|
vmm: qemu-runtime-rs
|
|
runs-on: s390x-large
|
|
env:
|
|
DOCKER_REGISTRY: ${{ inputs.registry }}
|
|
DOCKER_REPO: ${{ inputs.repo }}
|
|
DOCKER_TAG: ${{ inputs.tag }}
|
|
PR_NUMBER: ${{ inputs.pr-number }}
|
|
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
|
KATA_HOST_OS: "ubuntu"
|
|
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
|
KUBERNETES: ${{ matrix.k8s }}
|
|
PULL_TYPE: ${{ matrix.pull-type }}
|
|
SNAPSHOTTER: ${{ matrix.snapshotter }}
|
|
USING_NFD: ${{ matrix.using-nfd }}
|
|
TARGET_ARCH: "s390x"
|
|
AUTHENTICATED_IMAGE_USER: ${{ secrets.AUTHENTICATED_IMAGE_USER }}
|
|
AUTHENTICATED_IMAGE_PASSWORD: ${{ secrets.AUTHENTICATED_IMAGE_PASSWORD }}
|
|
steps:
|
|
- 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: Set SNAPSHOTTER to empty if overlayfs
|
|
run: echo "SNAPSHOTTER=" >> "$GITHUB_ENV"
|
|
if: ${{ matrix.snapshotter == 'overlayfs' }}
|
|
|
|
- name: Set KBS and KBS_INGRESS if qemu-coco-dev
|
|
run: |
|
|
echo "KBS=true" >> "$GITHUB_ENV"
|
|
echo "KBS_INGRESS=nodeport" >> "$GITHUB_ENV"
|
|
if: ${{ matrix.vmm == 'qemu-coco-dev' }}
|
|
|
|
# qemu-runtime-rs only works with overlayfs
|
|
# See: https://github.com/kata-containers/kata-containers/issues/10066
|
|
- name: Configure the ${{ matrix.snapshotter }} snapshotter
|
|
run: bash tests/integration/kubernetes/gha-run.sh ${{ matrix.deploy-cmd }}
|
|
if: ${{ matrix.snapshotter != 'overlayfs' }}
|
|
|
|
- name: Deploy Kata
|
|
timeout-minutes: 10
|
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-zvsi
|
|
|
|
- name: Uninstall previous `kbs-client`
|
|
timeout-minutes: 10
|
|
run: bash tests/integration/kubernetes/gha-run.sh uninstall-kbs-client
|
|
if: ${{ matrix.vmm == 'qemu-coco-dev' }}
|
|
|
|
- name: Deploy CoCo KBS
|
|
timeout-minutes: 10
|
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-coco-kbs
|
|
if: ${{ matrix.vmm == 'qemu-coco-dev' }}
|
|
|
|
- name: Install `kbs-client`
|
|
timeout-minutes: 10
|
|
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
|
if: ${{ matrix.vmm == 'qemu-coco-dev' }}
|
|
|
|
- name: Run tests
|
|
timeout-minutes: 60
|
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
|
|
|
- name: Delete kata-deploy
|
|
if: always()
|
|
run: bash tests/integration/kubernetes/gha-run.sh cleanup-zvsi
|
|
|
|
- name: Delete CoCo KBS
|
|
if: always()
|
|
run: |
|
|
if [ "${KBS}" == "true" ]; then
|
|
bash tests/integration/kubernetes/gha-run.sh delete-coco-kbs
|
|
fi
|