From 6874547618fdffb5d7bc3002503b49010d865d03 Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Thu, 16 Jun 2022 12:25:17 +0200 Subject: [PATCH] SQ balena-deploy-block.sh --- automation/entry_scripts/balena-deploy-block.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/automation/entry_scripts/balena-deploy-block.sh b/automation/entry_scripts/balena-deploy-block.sh index c6d6a0a31..0e7c1fd12 100755 --- a/automation/entry_scripts/balena-deploy-block.sh +++ b/automation/entry_scripts/balena-deploy-block.sh @@ -30,10 +30,13 @@ if [ -f "/deploy/balena.yml" ]; then echo -e "\nversion: $(balena_lib_get_os_version)" >> "${RELEASE_DIR}/balena.yml" fi -balena_docker_create_compose_file "${MACHINE}" "${API_ENV}" "${RELEASE_VERSION}" "${BALENAOS_TOKEN}" "${BLOCKS}" "${RELEASE_DIR}" -if [ ! -f "${RELEASE_DIR}/docker-compose.yml" ]; then +# use /deploy folder to generate compose file to use local images that live there +balena_docker_create_compose_file "${MACHINE}" "${API_ENV}" "${RELEASE_VERSION}" "${BALENAOS_TOKEN}" "${BLOCKS}" "/deploy" +if [ ! -f "/deploy/docker-compose.yml" ]; then echo "[ERROR] Failed to generate compose file" exit 1 +else + cp "/deploy/docker-compose.yml" "${RELEASE_DIR}" fi echo "[INFO] Deploying to ${BALENAOS_ACCOUNT}/$APPNAME"