feat(flows): add update_mcp_worker flow with git_status, force-recreate, and health check
- update_mcp_worker.yml: git_status -> git_fetch -> git_pull (all cwd=scrum4me-docker) -> docker_compose_build -> docker_compose_up_recreate -> wait_for_health_worker - commands.yml.example: add docker_compose_up_recreate (--force-recreate) and wait_for_health_worker (polls /var/log/agent/current for 'pre-flight passed') Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9f590f1732
commit
6bee8e8741
2 changed files with 31 additions and 9 deletions
|
|
@ -2,30 +2,35 @@
|
|||
# Copy to /etc/ops-agent/flows/update_mcp_worker.yml on the host.
|
||||
#
|
||||
# Steps:
|
||||
# 1. Fetch remote refs
|
||||
# 2. Fast-forward pull (aborts if working tree is dirty)
|
||||
# 3. Rebuild the Docker image
|
||||
# 4. Recreate the container in detached mode
|
||||
# 5. Verify the container is running
|
||||
# 1. Show current git status (informational)
|
||||
# 2. Fetch remote refs
|
||||
# 3. Fast-forward pull (aborts if working tree is dirty)
|
||||
# 4. Rebuild the Docker image
|
||||
# 5. Recreate the container in detached mode (force-recreate picks up new image)
|
||||
# 6. Wait for worker pre-flight to pass (checks /var/log/agent/current)
|
||||
|
||||
name: Update MCP Worker
|
||||
description: Pull latest code, rebuild Docker image, and restart the MCP worker service
|
||||
steps:
|
||||
- command_key: git_status
|
||||
args: ["/srv/scrum4me/repos/scrum4me-docker"]
|
||||
on_failure: continue
|
||||
|
||||
- command_key: git_fetch
|
||||
args: ["/srv/scrum4me"]
|
||||
args: ["/srv/scrum4me/repos/scrum4me-docker"]
|
||||
on_failure: abort
|
||||
|
||||
- command_key: git_pull
|
||||
args: ["/srv/scrum4me"]
|
||||
args: ["/srv/scrum4me/repos/scrum4me-docker"]
|
||||
on_failure: abort
|
||||
|
||||
- command_key: docker_compose_build
|
||||
args: ["worker-idea"]
|
||||
on_failure: abort
|
||||
|
||||
- command_key: docker_compose_up
|
||||
- command_key: docker_compose_up_recreate
|
||||
args: ["worker-idea"]
|
||||
on_failure: abort
|
||||
|
||||
- command_key: docker_compose_ps_worker
|
||||
- command_key: wait_for_health_worker
|
||||
on_failure: continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue