Set a permanent directory for the container logs 27/140427/1
authorhalil.cakal <halil.cakal@est.tech>
Tue, 11 Mar 2025 14:23:33 +0000 (14:23 +0000)
committerhalil.cakal <halil.cakal@est.tech>
Tue, 11 Mar 2025 14:42:04 +0000 (14:42 +0000)
- Currently the container logs (cps-and-ncmp) being stored in the cps
  repository (in k6-tests/logs directory). In every build, cps code base
  being fetched freshly. Thus, the zipped container logs being lost.
- Now, by using the WORKSPACE variable set by Jenkins job, the logs will
  be stored under the root directory of WORKSPACE permanently.

Issue-ID: CPS-2676

Change-Id: I0f7f9a46b94fc3e438de39bbab04f9a59daf446b
Signed-off-by: halil.cakal <halil.cakal@est.tech>
k6-tests/make-logs.sh

index 0e42a96..6097624 100644 (file)
@@ -17,7 +17,7 @@
 
 SERVICE_NAME="cps-and-ncmp"
 TIMESTAMP=$(date +"%Y%m%d%H%M%S")
-LOG_DIR="logs"
+LOG_DIR="${WORKSPACE:-.}/logs"
 TEMP_DIR="$LOG_DIR/temp_$TIMESTAMP"
 ZIP_FILE="$LOG_DIR/${SERVICE_NAME}_logs_$TIMESTAMP.zip"