Skip to content

feat(pipelines): add build trigger watch mode with SSE reconnect#420

Draft
fhacloid wants to merge 1 commit intodevelopfrom
cursor/CLI-3-pipeline-build-watch-1e11
Draft

feat(pipelines): add build trigger watch mode with SSE reconnect#420
fhacloid wants to merge 1 commit intodevelopfrom
cursor/CLI-3-pipeline-build-watch-1e11

Conversation

@fhacloid
Copy link
Contributor

Summary

  • add --watch, --timeout, and --cancel-on-timeout flags to cy pipeline build trigger
  • implement build watch workflow that polls build status until completion and maps terminal states to script-friendly exit codes
  • stream build logs from getBuildEvents as server-sent events with reconnect support and Last-Event-ID tracking
  • add middleware support for opening build event streams (OpenBuildEventsStream) while keeping the existing GetBuildEvents helper
  • add typed exit-code error handling in main so command-specific non-1 exit codes are preserved

Exit code mapping

  • 0: build succeeded
  • 1: unexpected error
  • 2: build aborted
  • 3: build failed (including errored)
  • 4: timeout

Testing

  • GOTOOLCHAIN=go1.25.1 go test ./cmd/cycloid/pipelines -count=1
  • GOTOOLCHAIN=go1.25.1 go build ./...
  • make lint could not run in this environment because golangci-lint is not installed (and make also attempts to auto-generate .env requiring CY_SAAS_API_KEY).

Linear Issue: CLI-3

Open in Web Open in Cursor 

Co-authored-by: fhacloid <fhacloid@users.noreply.github.com>
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.

2 participants