This commit is contained in:
Diaa Sami 2021-09-06 12:22:19 +02:00 committed by Achilleas Koutsou
parent e788f64b03
commit 12c900ac35

View file

@ -166,13 +166,21 @@ build_image() {
# Start the compose.
greenprint "🚀 Starting compose"
sudo composer-cli --json compose start "$blueprint_name" "$image_type" | tee "$COMPOSE_START"
COMPOSE_ID=$(jq -r '.build_id' "$COMPOSE_START")
if rpm -q --quiet weldr-client; then
COMPOSE_ID=$(jq -r '.body.build_id' "$COMPOSE_START")
else
COMPOSE_ID=$(jq -r '.build_id' "$COMPOSE_START")
fi
# Wait for the compose to finish.
greenprint "⏱ Waiting for compose to finish: ${COMPOSE_ID}"
while true; do
sudo composer-cli --json compose info "${COMPOSE_ID}" | tee "$COMPOSE_INFO" > /dev/null
COMPOSE_STATUS=$(jq -r '.queue_status' "$COMPOSE_INFO")
if rpm -q --quiet weldr-client; then
COMPOSE_STATUS=$(jq -r '.body.queue_status' "$COMPOSE_INFO")
else
COMPOSE_STATUS=$(jq -r '.queue_status' "$COMPOSE_INFO")
fi
# Is the compose finished?
if [[ $COMPOSE_STATUS != RUNNING ]] && [[ $COMPOSE_STATUS != WAITING ]]; then
@ -267,7 +275,7 @@ name = "openssh-server"
version = "*"
[[packages]]
name = "python36"
name = "python3"
version = "*"
[[customizations.user]]