File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -101,10 +101,15 @@ jobs:
101101 done
102102 echo "Done waiting. Job status code: $status_code"
103103 kubectl logs -f $pod_name --container=train > /tmp/full_output.txt
104- grep '<?xml version="1.0" ?>' /tmp/full_output.txt # sanity check
105- csplit /tmp/full_output.txt '/<?xml version="1.0" ?>/'
106- cat xx00 # test logs
107- mv xx01 coverage.xml
104+ if grep -q '<?xml version="1.0" ?>' /tmp/full_output.txt; then
105+ # successful run. split the output into logs + coverage report
106+ csplit /tmp/full_output.txt '/<?xml version="1.0" ?>/';
107+ cat xx00 # test logs
108+ mv xx01 coverage.xml
109+ else
110+ # failed run, print everything
111+ cat /tmp/full_output.txt;
112+ fi
108113 exit $status_code
109114 shell : bash
110115
You can’t perform that action at this time.
0 commit comments