id: cb-035 title: "(kforge) Deploy artifact: list artifacts, trigger staging pipeline, check status" difficulty: hard category: custom_cli description: | Using the kforge CLI, deploy the latest build artifact for the "web-platform" service to the staging environment. First, list available artifacts to find the most recent successful build. Then trigger a deployment pipeline for staging using that artifact. Wait for the pipeline to reach a terminal state and report the result. If the deployment fails, roll back to the previously deployed version. tools_provided: - kforge initial_state: kforge: artifacts: - id: art-050 service: web-platform version: "2.3.1" build_status: success created_at: "2026-03-12T08:00:00Z" sha: "abc123f" - id: art-049 service: web-platform version: "2.3.0" build_status: success created_at: "2026-03-11T16:00:00Z" sha: "def456a" - id: art-048 service: web-platform version: "2.2.9" build_status: failed created_at: "2026-03-11T10:00:00Z" sha: "ghi789b" - id: art-047 service: api-gateway version: "1.5.2" build_status: success created_at: "2026-03-10T14:00:00Z" sha: "jkl012c" deployments: staging: web-platform: current_version: "2.3.0" artifact_id: art-049 deployed_at: "2026-03-11T17:00:00Z" status: healthy pipelines: [] expected_state: kforge: command_history: - pattern: "kforge artifact list.*--service.*web-platform" - pattern: "kforge deploy trigger.*--env.*staging.*--artifact.*art-050" - pattern: "kforge pipeline status" deployments: staging: web-platform: current_version: "2.3.1" artifact_id: art-050 scoring: outcome: 0.6 efficiency: 0.2 recovery: 0.2 max_turns: 10 optimal_commands: 4 timeout_seconds: 90