ci: fallback when dokploy app is not indexed
This commit is contained in:
@@ -348,14 +348,26 @@ deploy_target() {
|
||||
local target="$1"
|
||||
local application_id image
|
||||
|
||||
application_id="$(resolve_application_id \
|
||||
if ! application_id="$(resolve_application_id \
|
||||
"$(target_app_id_env "${target}")" \
|
||||
"$(target_app_name_env "${target}")")"
|
||||
"$(target_app_name_env "${target}")")"; then
|
||||
echo "Dokploy ${target}: Docker-provider app was not found; fallback to legacy webhook"
|
||||
legacy_webhook_deploy_target "${target}"
|
||||
return 0
|
||||
fi
|
||||
image="$(image_for_target "${target}")"
|
||||
|
||||
echo "Dokploy ${target}: set Docker image ${image}"
|
||||
save_docker_provider "${application_id}" "${image}"
|
||||
deploy_application "${target}" "${application_id}" "${image}"
|
||||
if ! save_docker_provider "${application_id}" "${image}"; then
|
||||
echo "Dokploy ${target}: saveDockerProvider failed; fallback to legacy webhook"
|
||||
legacy_webhook_deploy_target "${target}"
|
||||
return 0
|
||||
fi
|
||||
if ! deploy_application "${target}" "${application_id}" "${image}"; then
|
||||
echo "Dokploy ${target}: application.deploy failed; fallback to legacy webhook"
|
||||
legacy_webhook_deploy_target "${target}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
{
|
||||
echo "- ${target}: ${image}"
|
||||
|
||||
Reference in New Issue
Block a user