Add volume mount for storing k8s robot logs to the host
Issue-ID: POLICY-4546
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I498aa9db39d6b04e685a893c9bca41c6bb108265
diff --git a/helm/robot/templates/test-job.yaml b/helm/robot/templates/test-job.yaml
index 5d8a610..ed1669a 100644
--- a/helm/robot/templates/test-job.yaml
+++ b/helm/robot/templates/test-job.yaml
@@ -49,4 +49,11 @@
- name: ROBOT_FILE
value: {{ .Values.robot }}
command: [ "./run-test.sh", "$(ROBOT_FILE)" ]
- restartPolicy: Never
\ No newline at end of file
+ volumeMounts:
+ - name: robot-csit-pv
+ mountPath: /tmp
+ restartPolicy: Never
+ volumes:
+ - name: robot-csit-pv
+ hostPath:
+ path: {{ .Values.robotLogDir }}
\ No newline at end of file
diff --git a/helm/robot/values.yaml b/helm/robot/values.yaml
index 95df6fa..5baf8aa 100644
--- a/helm/robot/values.yaml
+++ b/helm/robot/values.yaml
@@ -67,4 +67,4 @@
robot: ""
readiness: []
-
+robotLogDir: ""
diff --git a/helm/run-test.sh b/helm/run-test.sh
index bb073c3..d40bb58 100755
--- a/helm/run-test.sh
+++ b/helm/run-test.sh
@@ -38,6 +38,6 @@
echo "Run Robot test"
echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
echo "Starting Robot test suites ..."
-python3 -m robot.run $ROBOT_VARIABLES $1
+python3 -m robot.run -d /tmp/ $ROBOT_VARIABLES $1
RESULT=$?
echo "RESULT: ${RESULT}"