@@ -102,13 +102,15 @@ jobs:
102102 -am -PMultiClusterIT1 \
103103 -ntp >> ~/run-tests-$attempt.log && return 0
104104 test_output=$(cat ~/run-tests-$attempt.log)
105-
106- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
107105
108106 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
109107 echo "$test_output"
110108 echo "==================== END: ~/run-tests-$attempt.log ======================"
111109
110+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
111+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
112+ fi
113+
112114 if echo "$test_output" | grep -q "Could not transfer artifact"; then
113115 if [ $attempt -lt $max_attempts ]; then
114116 echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
@@ -184,11 +186,13 @@ jobs:
184186 -ntp >> ~/run-tests-$attempt.log && return 0
185187 test_output=$(cat ~/run-tests-$attempt.log)
186188
187- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
188-
189189 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
190190 echo "$test_output"
191191 echo "==================== END: ~/run-tests-$attempt.log ======================"
192+
193+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
194+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
195+ fi
192196
193197 if echo "$test_output" | grep -q "Could not transfer artifact"; then
194198 if [ $attempt -lt $max_attempts ]; then
@@ -286,13 +290,15 @@ jobs:
286290 -am -PMultiClusterIT2DualTreeAutoEnhanced \
287291 -ntp >> ~/run-tests-$attempt.log && return 0
288292 test_output=$(cat ~/run-tests-$attempt.log)
289-
290- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
291293
292294 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
293295 echo "$test_output"
294296 echo "==================== END: ~/run-tests-$attempt.log ======================"
295297
298+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
299+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
300+ fi
301+
296302 if echo "$test_output" | grep -q "Could not transfer artifact"; then
297303 if [ $attempt -lt $max_attempts ]; then
298304 echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
@@ -389,13 +395,15 @@ jobs:
389395 -am -PMultiClusterIT2DualTreeManual \
390396 -ntp >> ~/run-tests-$attempt.log && return 0
391397 test_output=$(cat ~/run-tests-$attempt.log)
392-
393- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
394398
395399 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
396400 echo "$test_output"
397401 echo "==================== END: ~/run-tests-$attempt.log ======================"
398402
403+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
404+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
405+ fi
406+
399407 if echo "$test_output" | grep -q "Could not transfer artifact"; then
400408 if [ $attempt -lt $max_attempts ]; then
401409 echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
@@ -472,12 +480,14 @@ jobs:
472480 -ntp >> ~/run-tests-$attempt.log && return 0
473481 test_output=$(cat ~/run-tests-$attempt.log)
474482
475- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
476-
477483 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
478484 echo "$test_output"
479485 echo "==================== END: ~/run-tests-$attempt.log ======================"
480486
487+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
488+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
489+ fi
490+
481491 if echo "$test_output" | grep -q "Could not transfer artifact"; then
482492 if [ $attempt -lt $max_attempts ]; then
483493 echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
@@ -554,12 +564,14 @@ jobs:
554564 -ntp >> ~/run-tests-$attempt.log && return 0
555565 test_output=$(cat ~/run-tests-$attempt.log)
556566
557- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
558-
559567 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
560568 echo "$test_output"
561569 echo "==================== END: ~/run-tests-$attempt.log ======================"
562570
571+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
572+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
573+ fi
574+
563575 if echo "$test_output" | grep -q "Could not transfer artifact"; then
564576 if [ $attempt -lt $max_attempts ]; then
565577 echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
@@ -636,12 +648,14 @@ jobs:
636648 -ntp >> ~/run-tests-$attempt.log && return 0
637649 test_output=$(cat ~/run-tests-$attempt.log)
638650
639- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
640-
641651 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
642652 echo "$test_output"
643653 echo "==================== END: ~/run-tests-$attempt.log ======================"
644654
655+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
656+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
657+ fi
658+
645659 if echo "$test_output" | grep -q "Could not transfer artifact"; then
646660 if [ $attempt -lt $max_attempts ]; then
647661 echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
@@ -717,12 +731,14 @@ jobs:
717731 -ntp >> ~/run-tests-$attempt.log && return 0
718732 test_output=$(cat ~/run-tests-$attempt.log)
719733
720- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
721-
722734 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
723735 echo "$test_output"
724736 echo "==================== END: ~/run-tests-$attempt.log ======================"
725737
738+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
739+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
740+ fi
741+
726742 if echo "$test_output" | grep -q "Could not transfer artifact"; then
727743 if [ $attempt -lt $max_attempts ]; then
728744 echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
@@ -798,12 +814,14 @@ jobs:
798814 -ntp >> ~/run-tests-$attempt.log && return 0
799815 test_output=$(cat ~/run-tests-$attempt.log)
800816
801- mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/
802-
803817 echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
804818 echo "$test_output"
805819 echo "==================== END: ~/run-tests-$attempt.log ======================"
806820
821+ if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
822+ echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
823+ fi
824+
807825 if echo "$test_output" | grep -q "Could not transfer artifact"; then
808826 if [ $attempt -lt $max_attempts ]; then
809827 echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
0 commit comments