Copy container log to deploy (#688)

The container log is much more detailed than the default build.log,
which makes life much easier for a build maintainer. Before deleting the
container copy the log out to the deploy/ directory.
This commit is contained in:
Stefan Becker 2023-04-03 12:08:50 +03:00 committed by GitHub
parent 6dc45a80e7
commit 9249e146d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,6 +166,10 @@ time ${DOCKER} run \
# Ensure that deploy/ is always owned by calling user # Ensure that deploy/ is always owned by calling user
echo "copying results from deploy/" echo "copying results from deploy/"
${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy - | tar -xf - ${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy - | tar -xf -
echo "copying log from container ${CONTAINER_NAME} to depoy/"
${DOCKER} logs --timestamps "${CONTAINER_NAME}" &>deploy/build-docker.log
ls -lah deploy ls -lah deploy
# cleanup # cleanup