Skip to content
Snippets Groups Projects
Commit 7799ced1 authored by Jan David Mol's avatar Jan David Mol
Browse files

remove empty logfiles

parent 5a7d24a6
Branches
Tags
No related merge requests found
......@@ -135,9 +135,12 @@ function cleanup {
CREATE_TIME="${parts[3]}"
echo "Saving logs for job ${TASK_NAME} allocation ${ALLOC_ID}"
docker exec server.station.nomad.nomad-cluster.jumppad.dev nomad alloc logs -stderr "${ALLOC_ID}" "${TASK_NAME}" > "log/allocations/${ALLOC_NAME}-${TASK_NAME}-${CREATE_TIME}-${ALLOC_ID}.stderr.log"
docker exec server.station.nomad.nomad-cluster.jumppad.dev nomad alloc logs -stdout "${ALLOC_ID}" "${TASK_NAME}" > "log/allocations/${ALLOC_NAME}-${TASK_NAME}-${CREATE_TIME}-${ALLOC_ID}.stdout.log"
docker exec server.station.nomad.nomad-cluster.jumppad.dev nomad alloc logs -stderr "${ALLOC_ID}" "${TASK_NAME}" > "log/allocations/${ALLOC_NAME}-${TASK_NAME}-${CREATE_TIME}-${ALLOC_ID}.stderr.log" || true
docker exec server.station.nomad.nomad-cluster.jumppad.dev nomad alloc logs -stdout "${ALLOC_ID}" "${TASK_NAME}" > "log/allocations/${ALLOC_NAME}-${TASK_NAME}-${CREATE_TIME}-${ALLOC_ID}.stdout.log" || true
done
# clean up empty files (most containers log to either stderr or stdout)
find log -size 0 | xargs rm
fi
if [ -z "${preserve}" ]; then
make stop > /dev/null 2>&1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment