implemented gitops controller + drift detection
This commit is contained in:
@@ -340,26 +340,15 @@ func (h *EnvironmentHandler) resolveEnv(w http.ResponseWriter, r *http.Request)
|
||||
return &env, true
|
||||
}
|
||||
|
||||
type deployEventPayload struct {
|
||||
DeploymentID int64 `json:"deploymentId"`
|
||||
EnvID int64 `json:"envId"`
|
||||
EnvName string `json:"envName"`
|
||||
RepoID int64 `json:"repoId"`
|
||||
SHA string `json:"sha"`
|
||||
Ref string `json:"ref"`
|
||||
Status models.DeployStatus `json:"status"`
|
||||
TriggeredBy string `json:"triggeredBy"`
|
||||
}
|
||||
|
||||
func (h *EnvironmentHandler) publishDeployEvent(subject string, env *models.Environment, d *models.Deployment) {
|
||||
h.bus.Publish(subject, deployEventPayload{ //nolint:errcheck
|
||||
h.bus.Publish(subject, events.DeploymentEvent{ //nolint:errcheck
|
||||
DeploymentID: d.ID,
|
||||
EnvID: env.ID,
|
||||
EnvName: env.Name,
|
||||
RepoID: d.RepoID,
|
||||
SHA: d.SHA,
|
||||
Ref: d.Ref,
|
||||
Status: d.Status,
|
||||
Status: string(d.Status),
|
||||
TriggeredBy: d.TriggeredBy,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user