launcher/image/test/check_failure.sh
raw| 1 | #!/bin/bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | echo "Checking the status.txt file for test results:" |
| 5 | if [ -f /workspace/status.txt ]; then |
| 6 | cat /workspace/status.txt |
| 7 | if grep -qi 'failed' /workspace/status.txt; then |
| 8 | echo "The test failed for build $BUILD_ID." |
| 9 | exit 1 |
| 10 | else |
| 11 | echo "No test failure found." |
| 12 | exit |
| 13 | fi |
| 14 | else |
| 15 | echo "No status.txt file found." |
| 16 | fi |