- 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>
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
# Deploy the latest MCP worker image.
|
|
# Copy to /etc/ops-agent/flows/update_mcp_worker.yml on the host.
|
|
#
|
|
# Steps:
|
|
# 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/repos/scrum4me-docker"]
|
|
on_failure: abort
|
|
|
|
- command_key: git_pull
|
|
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_recreate
|
|
args: ["worker-idea"]
|
|
on_failure: abort
|
|
|
|
- command_key: wait_for_health_worker
|
|
on_failure: continue
|