mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-02 00:02:01 +00:00
gha: Store journalctl logs
This PR stores the journalctl logs. Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
parent
342d3a320d
commit
7299dbdb43
6
.github/workflows/run-k8s-tests-on-garm.yaml
vendored
6
.github/workflows/run-k8s-tests-on-garm.yaml
vendored
@ -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
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user