Skip to content
/ app-api Public template
generated from yiisoft/package-template
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 1.2.1 under development

- no changes in this release.
- Enh #456: Add "service update paused" case for swarm deployment log parsing (@samdark)

## 1.2.0 March 09, 2026

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ ifeq ($(PRIMARY_GOAL),prod-deploy)
prod-deploy: ## Deploy to production.
@set -euo pipefail; \
docker -H ${PROD_SSH} stack deploy --prune --detach=false --with-registry-auth -c docker/compose.yml -c docker/prod/compose.yml ${STACK_NAME} 2>&1 | tee deploy.log; \
if grep -qiE 'rollback:|update rolled back' deploy.log; then \
if grep -qiE 'rollback:|update rolled back|service update paused' deploy.log; then \
FAILED_TASK_ID=$$(grep -oiE 'task[[:space:]]+[a-z0-9]+' deploy.log | head -n 1 | awk '{print $$2}'); \
if [ -n "$${FAILED_TASK_ID}" ]; then \
echo "Docker Swarm update rolled back; failing job. Failed task ID: $${FAILED_TASK_ID}"; \
echo "Docker Swarm update failed. Failed task ID: $${FAILED_TASK_ID}"; \
echo "--- docker service logs ($${FAILED_TASK_ID}) ---"; \
docker -H ${PROD_SSH} service logs --timestamps --tail 500 "$${FAILED_TASK_ID}" || true; \
else \
echo 'Docker Swarm update rolled back; failing job. Failed task ID: not found in deploy output.'; \
echo 'Docker Swarm update failed. Failed task ID: not found in deploy output.'; \
fi; \
exit 1; \
fi
Expand Down