Обновить scripts/deploy-nextcloud.sh
Nextcloud CI/CD / Deploy Nextcloud (push) Failing after 10s

This commit is contained in:
2026-09-30 13:19:37 +03:00
parent dfc0161b2b
commit b69c0c9fc9
+33 -3
View File
@@ -51,6 +51,8 @@ fail()
on_error()
{
rc=$?
failed_command="${BASH_COMMAND}"
failed_line="${BASH_LINENO[0]:-unknown}"
trap - ERR
@@ -59,16 +61,44 @@ on_error()
echo " Nextcloud deployment FAILED"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo
echo "Exit code:"
echo " ${rc}"
echo
echo "Failed at line:"
echo " ${failed_line}"
echo
echo "Failed command:"
echo " ${failed_command}"
if [[ "${MIGRATION_STARTED:-false}" == "true" ]]; then
echo
echo "Database migration MAY already have started."
echo "Automatic rollback will NOT be performed."
if [[ -d "${BACKUP_DIR}" ]]; then
echo
echo "Pre-upgrade backup:"
echo " ${BACKUP_DIR}"
fi
elif [[ "${PRODUCTION_CHANGED:-false}" == "true" ]]; then
echo
echo "Automatic rollback is intentionally NOT performed."
echo "The Nextcloud database schema may already have been modified."
echo "Use the pre-upgrade PostgreSQL dump if a rollback is required."
echo "Production Compose configuration was changed,"
echo "but database migration was NOT started."
else
echo
echo "Production was NOT modified."
echo "Database migration was NOT started."
echo "No rollback is required."
fi
exit "${rc}"
}