diff --git a/.github/workflows/run-k8s-tests-on-garm.yaml b/.github/workflows/run-k8s-tests-on-garm.yaml index e04129c009..e52c819df0 100644 --- a/.github/workflows/run-k8s-tests-on-garm.yaml +++ b/.github/workflows/run-k8s-tests-on-garm.yaml @@ -85,14 +85,14 @@ jobs: timeout-minutes: 30 run: bash tests/integration/kubernetes/gha-run.sh run-tests - - name: Collect artifacts + - name: Collect artifacts ${{ matrix.vmm }} run: bash tests/integration/kubernetes/gha-run.sh collect-artifacts - - name: Archive artifacts + - name: Archive artifacts ${{ matrix.vmm }} uses: actions/upload-artifact@v3 with: name: k8s-tests-garm-${{ matrix.vmm }} - path: artifacts-${{ matrix.vmm }}.tar.gz + path: /tmp/artifacts retention-days: 1 if-no-files-found: error diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index a9b746f715..c8bdc4c35a 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -195,6 +195,7 @@ function run_tests() { pushd "${kubernetes_dir}" bash setup.sh + export start_time=$(date '+%Y-%m-%d %H:%M:%S') if [[ "${KATA_HYPERVISOR}" = "dragonball" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]] || [[ "${KATA_HYPERVISOR}" = "cloud-hypervisor" ]] && [[ "${SNAPSHOTTER}" = "devmapper" ]]; then # cloud-hypervisor runtime-rs issue is https://github.com/kata-containers/kata-containers/issues/9034 echo "Skipping tests for $KATA_HYPERVISOR using devmapper" @@ -210,8 +211,10 @@ function collect_artifacts() { rm -rf "${artifacts_dir}" fi mkdir -p "${artifacts_dir}" - info "Running teardown script to collect artifacts using ${KATA_HYPERVISOR} hypervisor" - bash "${kubernetes_dir}/../../../ci/teardown.sh" "${artifacts_dir}" + info "Collecting artifacts using ${KATA_HYPERVISOR} hypervisor" + local journalctl_log_filename="journalctl.log" + local journalctl_log_path="${artifacts_dir}/${journalctl_log_filename}" + sudo journalctl --since="$start_time" > "${journalctl_log_path}" } function cleanup_kata_deploy() {