Skip to content

Conversation

@IsaacJames
Copy link

Introduces a new pkg/cicd package that provides a generic interface for triggering deployments via external CICD systems. This package will be used by the rollback controller to trigger rollback deployments and poll for their completion status.

Implementation

pkg/cicd/deployer.go

Core interface and types:

  • Deployer interface:
    • TriggerDeployment(ctx, req) - Initiates a deployment in the CICD system
    • GetDeploymentStatus(ctx, deploymentID) - Retrieves current deployment status
    • Name() - Returns a human-readable deployer name for logging/metrics
  • DeploymentRequest - Embeds Rollback and Release resources with provider-specific options
  • DeploymentResult - Contains deployment ID, status, message, and URL
  • DeploymentStatus - Enum for Pending, InProgress, Succeeded, Failed, Unknown
  • DeployerError - Wraps errors with retryability information
  • NoopDeployer - Test implementation that always succeeds immediately

pkg/cicd/github/deployer.go

GitHub Deployments API implementation:

  • Derives owner/repo from the release's github type revision
  • Supports multiple github revisions via the repository option
  • Uses the deployment URL as the ID (encodes owner/repo/id for status polling)
  • Marks 5xx and 429 errors as retryable

pkg/cicd/github/deployer_test.go

Unit tests covering deployment triggering, status polling, error handling, and helper functions

@IsaacJames IsaacJames force-pushed the CI-3637-cicd-package branch from b1d18a9 to 7337f4e Compare January 6, 2026 11:33
Copy link
Contributor

@goelozev goelozev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on the implementation!

I don't have any comments or suggestions as of now! Let me know when it's ready for another look!

@IsaacJames IsaacJames force-pushed the CI-3637-cicd-package branch from 7337f4e to c8b86dc Compare January 8, 2026 09:33
@IsaacJames IsaacJames marked this pull request as ready for review January 8, 2026 09:34
@IsaacJames IsaacJames requested a review from goelozev January 8, 2026 09:53
@IsaacJames IsaacJames merged commit db85bab into pre-release-5.1.0 Jan 12, 2026
6 of 9 checks passed
@IsaacJames IsaacJames deleted the CI-3637-cicd-package branch January 12, 2026 11:24
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.

3 participants