mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-21 18:53:30 +00:00
Merge pull request #10501 from kata-containers/topic/ci-split-tests
ci: tdx: Split jobs to run in 2 different machines
This commit is contained in:
commit
6a9266124b
17
.github/workflows/run-kata-coco-tests.yaml
vendored
17
.github/workflows/run-kata-coco-tests.yaml
vendored
@ -36,7 +36,15 @@ jobs:
|
|||||||
- nydus
|
- nydus
|
||||||
pull-type:
|
pull-type:
|
||||||
- guest-pull
|
- guest-pull
|
||||||
runs-on: tdx
|
k8s-test-host-type:
|
||||||
|
- baremetal-attestation
|
||||||
|
- baremetal-no-attestation
|
||||||
|
include:
|
||||||
|
- k8s-test-host-type: baremetal-attestation
|
||||||
|
machine: tdx-attestation
|
||||||
|
- k8s-test-host-type: baremetal-no-attestation
|
||||||
|
machine: tdx-no-attestation
|
||||||
|
runs-on: ${{ matrix.machine }}
|
||||||
env:
|
env:
|
||||||
DOCKER_REGISTRY: ${{ inputs.registry }}
|
DOCKER_REGISTRY: ${{ inputs.registry }}
|
||||||
DOCKER_REPO: ${{ inputs.repo }}
|
DOCKER_REPO: ${{ inputs.repo }}
|
||||||
@ -46,7 +54,7 @@ jobs:
|
|||||||
KUBERNETES: "vanilla"
|
KUBERNETES: "vanilla"
|
||||||
USING_NFD: "true"
|
USING_NFD: "true"
|
||||||
KBS: "true"
|
KBS: "true"
|
||||||
K8S_TEST_HOST_TYPE: "baremetal"
|
K8S_TEST_HOST_TYPE: ${{ matrix.k8s-test-host-type }}
|
||||||
KBS_INGRESS: "nodeport"
|
KBS_INGRESS: "nodeport"
|
||||||
SNAPSHOTTER: ${{ matrix.snapshotter }}
|
SNAPSHOTTER: ${{ matrix.snapshotter }}
|
||||||
PULL_TYPE: ${{ matrix.pull-type }}
|
PULL_TYPE: ${{ matrix.pull-type }}
|
||||||
@ -75,14 +83,17 @@ jobs:
|
|||||||
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-tdx
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-tdx
|
||||||
|
|
||||||
- name: Uninstall previous `kbs-client`
|
- name: Uninstall previous `kbs-client`
|
||||||
|
if: ${{ matrix.machine != 'tdx-no-attestation' }}
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh uninstall-kbs-client
|
run: bash tests/integration/kubernetes/gha-run.sh uninstall-kbs-client
|
||||||
|
|
||||||
- name: Deploy CoCo KBS
|
- name: Deploy CoCo KBS
|
||||||
|
if: ${{ matrix.machine != 'tdx-no-attestation' }}
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh deploy-coco-kbs
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-coco-kbs
|
||||||
|
|
||||||
- name: Install `kbs-client`
|
- name: Install `kbs-client`
|
||||||
|
if: ${{ matrix.machine != 'tdx-no-attestation' }}
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
||||||
|
|
||||||
@ -99,7 +110,7 @@ jobs:
|
|||||||
run: bash tests/integration/kubernetes/gha-run.sh cleanup-snapshotter
|
run: bash tests/integration/kubernetes/gha-run.sh cleanup-snapshotter
|
||||||
|
|
||||||
- name: Delete CoCo KBS
|
- name: Delete CoCo KBS
|
||||||
if: always()
|
if: ${{ always() && matrix.machine != 'tdx-no-attestation' }}
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh delete-coco-kbs
|
run: bash tests/integration/kubernetes/gha-run.sh delete-coco-kbs
|
||||||
|
|
||||||
run-k8s-tests-on-sev:
|
run-k8s-tests-on-sev:
|
||||||
|
@ -33,12 +33,15 @@ else
|
|||||||
# we need run k8s-guest-pull-image.bats test first, otherwise the test result will be affected
|
# we need run k8s-guest-pull-image.bats test first, otherwise the test result will be affected
|
||||||
# by other cases which are using 'alpine' and 'quay.io/prometheus/busybox:latest' image.
|
# by other cases which are using 'alpine' and 'quay.io/prometheus/busybox:latest' image.
|
||||||
# more details https://github.com/kata-containers/kata-containers/issues/8337
|
# more details https://github.com/kata-containers/kata-containers/issues/8337
|
||||||
K8S_TEST_SMALL_HOST_UNION=( \
|
K8S_TEST_SMALL_HOST_ATTESTATION_REQUIRED_UNION=( \
|
||||||
"k8s-guest-pull-image-encrypted.bats" \
|
"k8s-guest-pull-image-encrypted.bats" \
|
||||||
"k8s-guest-pull-image.bats" \
|
|
||||||
"k8s-guest-pull-image-authenticated.bats" \
|
"k8s-guest-pull-image-authenticated.bats" \
|
||||||
"k8s-guest-pull-image-signature.bats" \
|
"k8s-guest-pull-image-signature.bats" \
|
||||||
"k8s-confidential-attestation.bats" \
|
"k8s-confidential-attestation.bats" \
|
||||||
|
)
|
||||||
|
|
||||||
|
K8S_TEST_SMALL_HOST_UNION=( \
|
||||||
|
"k8s-guest-pull-image.bats" \
|
||||||
"k8s-confidential.bats" \
|
"k8s-confidential.bats" \
|
||||||
"k8s-sealed-secret.bats" \
|
"k8s-sealed-secret.bats" \
|
||||||
"k8s-attach-handlers.bats" \
|
"k8s-attach-handlers.bats" \
|
||||||
@ -95,14 +98,19 @@ else
|
|||||||
|
|
||||||
case ${K8S_TEST_HOST_TYPE} in
|
case ${K8S_TEST_HOST_TYPE} in
|
||||||
small)
|
small)
|
||||||
K8S_TEST_UNION=(${K8S_TEST_SMALL_HOST_UNION[@]})
|
K8S_TEST_UNION=(${K8S_TEST_SMALL_HOST_ATTESTATION_REQUIRED_UNION[@]} ${K8S_TEST_SMALL_HOST_UNION[@]})
|
||||||
;;
|
;;
|
||||||
normal)
|
normal)
|
||||||
K8S_TEST_UNION=(${K8S_TEST_NORMAL_HOST_UNION[@]})
|
K8S_TEST_UNION=(${K8S_TEST_NORMAL_HOST_UNION[@]})
|
||||||
;;
|
;;
|
||||||
all|baremetal)
|
all|baremetal)
|
||||||
|
K8S_TEST_UNION=(${K8S_TEST_SMALL_HOST_ATTESTATION_REQUIRED_UNION[@]} ${K8S_TEST_SMALL_HOST_UNION[@]} ${K8S_TEST_NORMAL_HOST_UNION[@]})
|
||||||
|
;;
|
||||||
|
baremetal-attestation)
|
||||||
|
K8S_TEST_UNION=(${K8S_TEST_SMALL_HOST_ATTESTATION_REQUIRED_UNION[@]})
|
||||||
|
;;
|
||||||
|
baremetal-no-attestation)
|
||||||
K8S_TEST_UNION=(${K8S_TEST_SMALL_HOST_UNION[@]} ${K8S_TEST_NORMAL_HOST_UNION[@]})
|
K8S_TEST_UNION=(${K8S_TEST_SMALL_HOST_UNION[@]} ${K8S_TEST_NORMAL_HOST_UNION[@]})
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "${K8S_TEST_HOST_TYPE} is an invalid K8S_TEST_HOST_TYPE option. Valid options are: small | normal | all | baremetal"
|
echo "${K8S_TEST_HOST_TYPE} is an invalid K8S_TEST_HOST_TYPE option. Valid options are: small | normal | all | baremetal"
|
||||||
|
Loading…
Reference in New Issue
Block a user