Skip to content

Commit

Permalink
SQ balena-deploy-block.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgg committed Jun 16, 2022
1 parent af65062 commit 6874547
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions automation/entry_scripts/balena-deploy-block.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6874547

Please sign in to comment.