Skip to content

Add another case for swarm deployment log parsing #455

@samdark

Description

@samdark

Description

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 failed. Failed task ID: ${FAILED_TASK_ID}"
    echo "--- docker service logs (${FAILED_TASK_ID}) ---"
    docker service logs --timestamps --tail 500 "${FAILED_TASK_ID}" || true
  else
    echo 'Docker Swarm update failed. Failed task ID: not found in deploy output.'
  fi
  exit 1
fi

Package version

No response

PHP version

No response

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions