Skip to content

feat: [2/3] add provider-agnostic deploy package for preview environments#183

Open
alexvcodesphere wants to merge 2 commits intocodesphere-cloud:mainfrom
alexvcodesphere:feat/2-deploy-package
Open

feat: [2/3] add provider-agnostic deploy package for preview environments#183
alexvcodesphere wants to merge 2 commits intocodesphere-cloud:mainfrom
alexvcodesphere:feat/2-deploy-package

Conversation

@alexvcodesphere
Copy link
Member

PR 2/3: Deploy Package

Add pkg/deploy with a Deployer that orchestrates workspace lifecycle for preview environments.

Changes

  • pkg/deploy/deploy.go — Provider-agnostic deployer: find/create/update/delete workspaces, run pipeline, use DevDomain for URLs
  • pkg/deploy/deploy_test.go — 11 ginkgo test cases covering all code paths
  • pkg/deploy/mocks.go — Generated mocks

Merge Order

Merge PR 1/3 (#182) first, then this PR, then PR 3/3.

  1. PR 1/3 (feat: [1/3] refactor pipeline into shared package with step-aware log streaming #182) — pipeline refactor + streaming
  2. PR 2/3 ← this PR — pkg/deploy package
  3. PR 3/3 — cs deploy github CLI command

…ming

Extract pipeline stage execution from cli/cmd/start_pipeline.go into a
reusable pkg/pipeline package with a Runner that orchestrates stage
execution, discovers sub-steps from the IDE server's pipeline status API,
and streams logs per-step via SSE.

- Add pkg/pipeline with Runner, Client interface, and step discovery
- Add StreamLogs SSE method to api/workspace.go for real-time log output
- Add StreamLogs to cli/cmd Client interface
- Refactor start_pipeline.go to delegate to pipeline.Runner
- Add pipeline streaming unit tests (single/multi-step, no-stream cases)
- Update .mockery.yml for pipeline mock generation

Signed-off-by: Alex <132889147+alexvcodesphere@users.noreply.github.com>
Add pkg/deploy with a Deployer that orchestrates workspace lifecycle:
find, create, update, delete, and run pipeline stages. Uses DevDomain
from the workspace API for deployment URLs instead of hardcoding.

- Deployer embeds pipeline.Client for pipeline operations
- Config is provider-agnostic (no GitHub/GitLab references)
- 11 ginkgo test cases covering all code paths
- Generated mocks via mockery

Signed-off-by: Alex <132889147+alexvcodesphere@users.noreply.github.com>
@alexvcodesphere alexvcodesphere requested a review from a team as a code owner February 20, 2026 18:34
@alexvcodesphere alexvcodesphere changed the title feat: add provider-agnostic deploy package for preview environments feat: [2/3] add provider-agnostic deploy package for preview environments Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant