mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-04 10:24:37 +00:00
gha: Add collect artifacts function in gha-run script
This PR adds the collect artifacts function in gha-run script for the kubernetes tests. Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
6
.github/workflows/run-k8s-tests-on-garm.yaml
vendored
6
.github/workflows/run-k8s-tests-on-garm.yaml
vendored
@@ -85,10 +85,10 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
||||||
|
|
||||||
- name: Make artifacts tarball ${{ matrix.vmm }}
|
- name: Collect artifacts
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh make-tarball-artifacts
|
run: bash tests/integration/kubernetes/gha-run.sh collect-artifacts
|
||||||
|
|
||||||
- name: Archive artifacts ${{ matrix.vmm }}
|
- name: Archive artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: k8s-tests-garm-${{ matrix.vmm }}
|
name: k8s-tests-garm-${{ matrix.vmm }}
|
||||||
|
@@ -204,6 +204,16 @@ function run_tests() {
|
|||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function collect_artifacts() {
|
||||||
|
local artifacts_dir="/tmp/artifacts"
|
||||||
|
if [ -d "${artifacts_dir}" ]; then
|
||||||
|
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}"
|
||||||
|
}
|
||||||
|
|
||||||
function cleanup_kata_deploy() {
|
function cleanup_kata_deploy() {
|
||||||
ensure_yq
|
ensure_yq
|
||||||
|
|
||||||
@@ -382,6 +392,7 @@ function main() {
|
|||||||
deploy-snapshotter) deploy_snapshotter ;;
|
deploy-snapshotter) deploy_snapshotter ;;
|
||||||
run-tests) run_tests ;;
|
run-tests) run_tests ;;
|
||||||
run-tests-kcli) run_tests "kcli" ;;
|
run-tests-kcli) run_tests "kcli" ;;
|
||||||
|
collect-artifacts) collect_artifacts ;;
|
||||||
cleanup-kcli) cleanup "kcli" ;;
|
cleanup-kcli) cleanup "kcli" ;;
|
||||||
cleanup-sev) cleanup "sev" ;;
|
cleanup-sev) cleanup "sev" ;;
|
||||||
cleanup-snp) cleanup "snp" ;;
|
cleanup-snp) cleanup "snp" ;;
|
||||||
|
Reference in New Issue
Block a user