Documentation
¶
Index ¶
Constants ¶
const (
DeploymentRevisionNameKey = "deployment_revision_name"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
Deployer implements cicd.Deployer using the GitHub Deployments API. This creates GitHub deployment events that can be consumed by any CICD system that watches for them.
The deployer extracts owner/repo from the target release's revision with Type="github" and Source in "owner/repo" format. Environment is optionally taken from Options["environment"].
func NewDeployer ¶
NewDeployer creates a new GitHub Deployments deployer.
func (*Deployer) GetDeploymentStatus ¶
func (d *Deployer) GetDeploymentStatus(ctx context.Context, deploymentID string) (*cicd.DeploymentResult, error)
GetDeploymentStatus retrieves the current status of a GitHub deployment. The deploymentID should be the URL returned from TriggerDeployment (e.g., "https://github.com/owner/repo/deployments/123").
func (*Deployer) TriggerDeployment ¶
func (d *Deployer) TriggerDeployment(ctx context.Context, req cicd.DeploymentRequest) (*cicd.DeploymentResult, error)
TriggerDeployment creates a GitHub deployment event. GitHub deployments require the "deployment_revision_name" field to be set in the req.Options map. E.g. "deployment_revision_name": "application". This is the name of the revision on which the GitHub deployment will be created.