1---2name: release-aa-backend-prod3description: Release Automation Analytics backend to production via app-interface. Updates deploy-clowder.yml with new SHA, creates Jira issue, MR for approval. Use when user says "release AA backend", "release analytics".4---56# Release AA Backend to Production78## Inputs910| Input | Type | Default | Purpose |11|-------|------|---------|---------|12| `commit_sha` | string | required | Full SHA1 commit to release (must exist in repo and Quay) |13| `release_date` | string | today | Release date for Jira title (YYYY-MM-DD) |14| `include_billing` | bool | false | Also promote billing component |1516## Workflow1718### 1. Bootstrap19- `persona_load("release")` — git, quay, appinterface tools20- `check_known_issues("quay", "")`, `check_known_issues("app-interface", "")`21- Load config from `config.json` — backend path, app-interface path, deploy file, Quay repo2223### 2. Verification24- Verify commit exists: `git cat-file -t {commit_sha}` in backend repo25- `quay_get_tag(repository="aap-aa-tenant/aap-aa-main/automation-analytics-backend-main", tag="{commit_sha}", namespace="redhat-services-prod")` — image must exist2627### 3. Get Current State28- Read `deploy-clowder.yml` from app-interface: `data/services/insights/tower-analytics/cicd/deploy-clowder.yml`29- Parse current prod SHA from `tower-analytics-prod` ref30- `git log --oneline {current_prod_sha}..{commit_sha}` — changelog3132### 4. Create Jira Issue33- `persona_load("developer")` — for Jira tools34- `jira_create_issue(summary="{release_date} Analytics HCC Service Release", issue_type="Story", project="AAP", labels="release,production")`3536### 5. Prepare App-Interface37- `persona_load("release")`38- `git_status(repo="{appinterface_repo}")` — must be clean39- `git_checkout(target="master")`, `git_fetch(remote="upstream")`, `git_rebase(onto="upstream/master")`40- Create branch: `aa-release-{release_date}` or `aa-release-{date}-v{N}` if exists41- Update deploy-clowder.yml: replace `tower-analytics-prod` ref with `{commit_sha}`42- If `include_billing`: update `tower-analytics-prod-billing` ref too4344### 6. Commit and Push45- `git_add(files="{deploy_file}")`46- `git_commit(message="chore(release): release {sha} to production", issue_key="{jira_key}", commit_type="chore", scope="release")`47- `git_push(branch="{branch_name}", set_upstream=true)`4849### 7. Create MR50- `persona_load("developer")`51- `gitlab_mr_create(project="app-interface", title="{jira_key} - {release_date} Analytics HCC Service Release", description="...", target_branch="master", source_branch="{branch_name}", draft=false)`5253### 8. Post-Release54- `jira_add_comment(issue_key="{jira_key}", comment="App-Interface MR created: {mr_url}")`55- `skill_run("notify_team", '{"template": "release", "template_data": {...}}')`56- `memory_session_log("Prepared production release", "SHA: {sha}, Jira: {jira_key}")`5758### 9. Failure Learning59- Image not found → `learn_tool_fix("quay_check_image_exists", "image not found", "Build not complete", "Check konflux_list_builds()")`60- No such host → `learn_tool_fix("gitlab_mr_create", "no such host", "VPN not connected", "Run vpn_connect()")`61- Unauthorized → `learn_tool_fix("jira_create_issue", "unauthorized", "Jira auth failed", "Check config.json")`6263## Key MCP Tools6465- `persona_load`, `git_status`, `git_checkout`, `git_fetch`, `git_rebase`, `git_add`, `git_commit`, `git_push`66- `quay_get_tag`, `jira_create_issue`, `jira_add_comment`67- `gitlab_mr_create`, `skill_run`, `check_known_issues`, `learn_tool_fix`68- `memory_session_log`, `knowledge_query`6970## Config Resolution7172- Paths from `config.json` → repositories, app_interface, deploy_file73- Quay: `quay.io/redhat-services-prod/aap-aa-tenant/aap-aa-main/automation-analytics-backend-main`74- Deploy file: `data/services/insights/tower-analytics/cicd/deploy-clowder.yml`7576## Next Steps After MR77781. Review MR792. Get team approval803. Merge to trigger deployment814. Monitor ArgoCD/App-Interface825. Verify pods in `tower-analytics-prod`