Skip to content

Commit f604e07

Browse files
Merge pull request #1739 from atlassian/copy-results/add-results-dir-creation
copy-results/add-results-dir-creation
2 parents aae4787 + 4e26a27 commit f604e07

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

app/util/k8s/bzt_on_pod.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ kubectl exec -it "$exec_pod_name" -n atlassian -- docker run --shm-size=4g -v "/
6767
sleep 10
6868

6969
echo "INFO: Copy results folder from the exec env pod to local"
70+
# Ensure the local results directory exists
71+
local_results_dir="/data-center-terraform/dc-app-performance-toolkit/app/results"
72+
mkdir -p "$local_results_dir"
73+
7074
for _ in {1..3}; do
71-
if kubectl exec -n atlassian "$exec_pod_name" --request-timeout=60s -- tar czf - -C /dc-app-performance-toolkit/app results | tar xzf - -C /data-center-terraform/dc-app-performance-toolkit/app/results --strip-components=1; then
75+
if kubectl exec -n atlassian "$exec_pod_name" --request-timeout=60s -- tar czf - -C /dc-app-performance-toolkit/app results | tar xzf - -C "$local_results_dir" --strip-components=1; then
7276
break
7377
else
7478
echo "Copying failed, retrying..."

app/util/k8s/copy_run_results.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ fi
3030
echo "INFO: Execution environment pod name: $exec_pod_name"
3131

3232
echo "INFO: Copy results folder from the exec env pod to local"
33+
# Ensure the local results directory exists
34+
local_results_dir="/data-center-terraform/dc-app-performance-toolkit/app/results"
35+
mkdir -p "$local_results_dir"
36+
3337
for _ in {1..3}; do
34-
if kubectl exec -n atlassian "$exec_pod_name" --request-timeout=60s -- tar czf - -C /dc-app-performance-toolkit/app results | tar xzf - -C /data-center-terraform/dc-app-performance-toolkit/app/results --strip-components=1; then
38+
if kubectl exec -n atlassian "$exec_pod_name" --request-timeout=60s -- tar czf - -C /dc-app-performance-toolkit/app results | tar xzf - -C "$local_results_dir" --strip-components=1; then
3539
break
3640
else
3741
echo "Copying failed, retrying..."

0 commit comments

Comments
 (0)