ci: fallback when dokploy app is not indexed
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 20s
CI/CD Pipeline / Build and Push Images (push) Successful in 6s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s

This commit is contained in:
2026-04-28 23:41:42 +02:00
parent e4ee9efdc1
commit 7e961f18fa

View File

@@ -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}"