Skip to content
Snippets Groups Projects
Commit d8dfd542 authored by Julien Leduc's avatar Julien Leduc
Browse files

Fixing systemtest logs artifacts

parent eab59fc1
Branches
Tags
No related merge requests found
......@@ -39,8 +39,9 @@ for podcontainer in "init -c ctainit" "ctacli -c ctacli" "ctaeos -c mgm" "ctafro
done
kubectl --namespace ${instance} exec ctacli -- tar -C /mnt/logs -zcf - . > ${tmpdir}/varlog.tgz
if [ -z "${CI_PIPELINE_ID}" ]; then
if [ ! -z "${CI_PIPELINE_ID}" ]; then
# we are in the context of a CI run => save artifacts in the directory structure of the build
echo "Saving logs as artifacts"
mkdir -p ../../pod_logs/${instance}
cp -r ${tmpdir}/* ../../pod_logs/${instance}
fi
......
......@@ -70,6 +70,10 @@ if [ ! -z "${error}" ]; then
fi
log_dir="${orchestration_dir}/../../pod_logs/${namespace}"
mkdir -p ${log_dir}
function execute_log {
mycmd=$1
logfile=$2
......@@ -86,11 +90,11 @@ function execute_log {
}
# create instance
execute_log "./create_instance.sh -n ${namespace} ${CREATE_OPTS} 2>&1" "${orchestration_dir}/../../create_instance.log"
execute_log "./create_instance.sh -n ${namespace} ${CREATE_OPTS} 2>&1" "${log_dir}/create_instance.log"
# launch system test
cd $(dirname ${systemtest_script})
execute_log "./$(basename ${systemtest_script}) -n ${namespace} 2>&1" "${orchestration_dir}/../../systests.sh.log"
execute_log "./$(basename ${systemtest_script}) -n ${namespace} 2>&1" "${log_dir}/systests.sh.log"
cd ${orchestration_dir}
# delete instance?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment