tests: kill journalctl even if compose fails
This prevents Gitlab CI from getting stuck if something goes wrong with the compose.
This commit is contained in:
parent
8c1afdd727
commit
3a8c6c8ab8
6 changed files with 12 additions and 18 deletions
|
|
@ -138,6 +138,8 @@ sudo composer-cli blueprints depsolve bp
|
|||
WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service")
|
||||
sudo journalctl -af -n 1 -u "${WORKER_UNIT}" &
|
||||
WORKER_JOURNAL_PID=$!
|
||||
# Stop watching the worker journal when exiting.
|
||||
trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT
|
||||
|
||||
# Start the compose
|
||||
greenprint "🚀 Starting compose"
|
||||
|
|
@ -170,9 +172,6 @@ if [[ $COMPOSE_STATUS != FINISHED ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Stop watching the worker journal.
|
||||
sudo pkill -P ${WORKER_JOURNAL_PID}
|
||||
|
||||
# Download the image.
|
||||
greenprint "📥 Downloading the image"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue