1---2name: release-to-prod3description: Create a Konflux release to push images from staging to production. Verifies image exists, runs security scan, validates app-interface, creates release. Use when user says "release to prod", "promote to production".4---56# Release to Production78## Inputs910| Input | Type | Default | Purpose |11|-------|------|---------|---------|12| `commit_sha` | string | required | Full 40-char git SHA to release |13| `component` | string | automation-analytics-backend-main | Konflux component name |14| `namespace` | string | aap-aa-tenant | Konflux tenant namespace |15| `application` | string | aap-aa-main | Konflux application name |16| `dry_run` | bool | false | Show what would be released without creating |1718## Workflow1920### 1. Bootstrap21- `persona_load("release")` — load konflux, quay, appinterface tools22- `check_known_issues("konflux", "")`, `check_known_issues("quay", "")`23- `knowledge_query(project="automation-analytics-backend", persona="devops", section="gotchas")`2425### 2. Validate Input26- Validate commit SHA: 40 chars, hex only27- Reject short SHAs (8 chars) — they don't exist in Quay2829### 3. Pre-flight Checks30- `quay_check_image_exists(repository="{namespace}/{application}/{component}", tag="{commit_sha}", namespace="redhat-user-workloads")` — image must exist in staging31- `konflux_get_application(name="{application}", namespace="{namespace}")`32- `prometheus_pre_deploy_check(environment="production")` — no firing alerts3334### 4. Security Scan35- `skill_run("scan_vulnerabilities", '{"image_tag": "{commit_sha}", "repository": "...", "namespace": "redhat-user-workloads", "fail_on_critical": true}')`36- Block release if critical vulnerabilities found3738### 5. Component & Release Status39- `konflux_get_component(name="{component}", namespace="{namespace}")`40- `konflux_list_components(namespace="{namespace}")`41- `konflux_list_releases(namespace="{namespace}", limit=10)` — check if already released42- `konflux_get_release(namespace="{namespace}")` — latest release4344### 6. App-Interface Validation45- `appinterface_validate()` — validate config before release4647### 7. Create Release (if not dry_run)48- `konflux_create_release(snapshot="{commit_sha}", namespace="{namespace}")`4950### 8. Post-Release51- `memory_session_log("Created Konflux release", "SHA: {short}, Component: {component}")`52- `memory_append("state/releases", "release_history", item)` — track release53- `skill_run("notify_team", '{"template": "release", "template_data": {...}}')`5455### 9. Failure Learning56- Image not found → `learn_tool_fix("quay_check_image_exists", "image not found", "Image not built yet", "Wait for Konflux build, check konflux_list_builds()")`57- Unauthorized → `learn_tool_fix("konflux_get_component", "unauthorized", "K8s auth expired", "Run kube_login(cluster='konflux')")`58- No route to host → `learn_tool_fix("konflux_get_component", "no route to host", "VPN not connected", "Run vpn_connect()")`59- Already exists → `learn_tool_fix("konflux_create_release", "already exists", "Release for SHA exists", "Check konflux_list_releases()")`6061## Key MCP Tools6263- `persona_load`, `quay_check_image_exists`, `quay_get_vulnerabilities`64- `konflux_get_application`, `konflux_get_component`, `konflux_list_components`65- `konflux_list_releases`, `konflux_get_release`, `konflux_create_release`66- `appinterface_validate`, `prometheus_pre_deploy_check`67- `skill_run`, `check_known_issues`, `learn_tool_fix`68- `memory_session_log`, `memory_append`, `knowledge_query`6970## Key Namespace7172- **aap-aa-tenant** — Konflux tenant for Automation Analytics7374## Prerequisites7576- Image must be built and available in Quay staging (redhat-user-workloads)77- VPN required for Konflux cluster access78- Run `scan_vulnerabilities` before production release