Add timestamp to report file names for scripts which run tests
* Added functions.sh file to store reusable bash functions
* Replaced 'latest' in generated report names by timestamps
Related-PROD: PROD-37187
Change-Id: I9e2bc7989a685b0f2f94fb909a8f2f1cc7a6d803
diff --git a/k8s/workspace/run-conformance-mcc.sh b/k8s/workspace/run-conformance-mcc.sh
index c6b8be4..c49bcb7 100644
--- a/k8s/workspace/run-conformance-mcc.sh
+++ b/k8s/workspace/run-conformance-mcc.sh
@@ -1,4 +1,6 @@
#!/bin/bash
+
+. "$(dirname "$0")/functions.sh"
tenv=mcc
. /opt/si-tests/.sivenv/bin/activate
cd $MY_PROJFOLDER/tmp
@@ -42,5 +44,7 @@
fi
cp ./artifacts/*.xml $MY_PROJFOLDER/reports/${tenv}-conformance/
cd $MY_PROJFOLDER/reports/
-tparser -f r_xml --omit-status SKIP --force-single -d -r $MY_CLIENTSHORTNAME-${tenv}-conformance-latest.html $MY_PROJFOLDER/reports/${tenv}-conformance/
+fname="$MY_CLIENTSHORTNAME-${tenv}-conformance-$(get_timestamp).html"
+tparser -f r_xml --omit-status SKIP --force-single -d -r "${fname}" $MY_PROJFOLDER/reports/${tenv}-conformance/
+update_latest_report_to "${fname}"
cd $MY_PROJFOLDER