- Update ops-agent/flows.example/update_scrum4me_web.yml with full deployment steps: git_status, git_fetch, git_log_ahead, git_pull, npm_ci, prisma_migrate_deploy, npm_run_build, systemctl_restart, and smoke test against thuis.jp-visser.nl/api/products - Add npm_ci, prisma_migrate_deploy, npm_run_build, and curl_smoke_scrum4me_thuis to commands.yml.example - Add /flows/update-scrum4me-web UI page with Run and Dry Run buttons, streaming terminal output, and link to audit log on completion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
# Deploy the latest Scrum4Me web application from source.
|
|
# Copy to /etc/ops-agent/flows/update_scrum4me_web.yml on the host.
|
|
#
|
|
# Steps:
|
|
# 1. Show current git status (dirty tree aborts later at git_pull)
|
|
# 2. Fetch remote refs
|
|
# 3. Show commits ahead of upstream
|
|
# 4. Fast-forward pull (aborts if working tree is dirty)
|
|
# 5. Install dependencies
|
|
# 6. Apply database migrations
|
|
# 7. Build the application
|
|
# 8. Restart the systemd service
|
|
# 9. Smoke-test the public endpoint (200 or 401 = pass)
|
|
|
|
name: Update Scrum4Me Web
|
|
description: Pull latest code, install deps, run migrations, build, and restart scrum4me-web.service
|
|
steps:
|
|
- command_key: git_status
|
|
args: ["/srv/scrum4me/repos/Scrum4Me"]
|
|
on_failure: continue
|
|
|
|
- command_key: git_fetch
|
|
args: ["/srv/scrum4me/repos/Scrum4Me"]
|
|
on_failure: abort
|
|
|
|
- command_key: git_log_ahead
|
|
args: ["/srv/scrum4me/repos/Scrum4Me"]
|
|
on_failure: continue
|
|
|
|
- command_key: git_pull
|
|
args: ["/srv/scrum4me/repos/Scrum4Me"]
|
|
on_failure: abort
|
|
|
|
- command_key: npm_ci
|
|
on_failure: abort
|
|
|
|
- command_key: prisma_migrate_deploy
|
|
on_failure: abort
|
|
|
|
- command_key: npm_run_build
|
|
on_failure: abort
|
|
|
|
- command_key: systemctl_restart
|
|
args: ["scrum4me-web"]
|
|
on_failure: abort
|
|
|
|
- command_key: curl_smoke_scrum4me_thuis
|
|
on_failure: continue
|