Execute deployment to target environment - supports dry-run mode, captures deployment metrics and logs, handles rollback on failure. Use after pop-deploy-validate confirms readiness. Do NOT use without validating first.
From popkit-opsnpx claudepluginhub jrc1883/popkit-ai --plugin popkit-opsThis skill uses the workspace's default tool permissions.
scripts/execute_deployment.pyCaptures architectural decisions in Claude Code sessions as structured ADRs. Auto-detects choices between alternatives and maintains a docs/adr log for codebase rationale.
Builds new API connectors or providers by exactly matching the target repo's existing integration patterns. Use when adding integrations like Jira or Slack without inventing new architectures.
Provides REST API design patterns for resource naming, URL structures, HTTP methods/status codes, pagination, filtering, errors, versioning, and rate limiting.
Execute deployment to target environment with safety controls.
Trigger: /popkit-ops:deploy execute or after validation passes
Purpose: Execute the actual deployment to the target environment. Supports dry-run mode for safe testing, captures deployment metrics and logs, and handles automatic rollback on failure.
| Step | When | Decision ID |
|---|---|---|
| 1 | Target selection | deploy_target |
| 2 | Mode selection | deploy_mode |
| 3 | Before live deploy | confirm_deploy |
| 4 | After deployment | post_deploy |
Skipping these violates PopKit UX standard.
python scripts/execute_deployment.py --dir . --action prepare --target docker
This:
Use AskUserQuestion:
- question: "Which target should I deploy?"
- header: "Target"
- options:
- "Primary target" - Deploy to primary configured target
- "All targets" - Deploy to all enabled targets
- "Choose target" - Select specific target
Use AskUserQuestion:
- question: "How should I deploy?"
- header: "Mode"
- options:
- "Dry run (Recommended first)" - Simulate without executing
- "Deploy" - Execute the deployment
- "Canary deploy" - Deploy to small percentage first
Use AskUserQuestion:
- question: "Ready to deploy? This will push changes to the target environment."
- header: "Confirm"
- options:
- "Deploy now" - Execute
- "Dry run first" - Simulate first
- "Abort" - Cancel
python scripts/execute_deployment.py --dir . --action execute --target docker --mode deploy --version 1.2.0
Use AskUserQuestion:
- question: "Deployment complete. What next?"
- header: "Result"
- options:
- "Verify deployment" - Health checks
- "Rollback" - Something went wrong
- "Done" - Deployment successful
Deployment Execution
====================
Target: docker (primary)
Mode: deploy
Version: 1.2.0
Environment: production
Steps:
[1/5] Building image... done (45s)
[2/5] Pushing to registry... done (12s)
[3/5] Updating deployment... done (3s)
[4/5] Waiting for rollout... done (30s)
[5/5] Health check... passed
Result: SUCCESS
Duration: 90s
Deployment ID: deploy-20260318-143022
Image: ghcr.io/myorg/myapp:1.2.0
History updated in .claude/popkit/deploy.json
Next: Verify with /popkit-ops:deploy validate or rollback with /popkit-ops:deploy rollback
When deployment fails:
Called by:
/popkit-ops:deploy execute commandpop-deploy-validate workflow (proceed to deploy step)Triggers:
Followed by:
pop-deploy-rollback - If deployment fails or needs rollbackpop-deploy-validate - Post-deploy verification| Component | Relationship |
|---|---|
pop-deploy-validate | Pre-deploy validation |
pop-deploy-rollback | Rollback on failure |
deployment-validator | Agent for verification |
deploy.json | Configuration and history |