NotifyExternal FIXME ...
(pipelineId uint64)
| 398 | |
| 399 | // NotifyExternal FIXME ... |
| 400 | func NotifyExternal(pipelineId uint64) errors.Error { |
| 401 | notification := GetPipelineNotificationService() |
| 402 | if notification == nil { |
| 403 | return nil |
| 404 | } |
| 405 | // send notification to an external web endpoint |
| 406 | pipeline, err := GetPipeline(pipelineId, true) |
| 407 | if err != nil { |
| 408 | return err |
| 409 | } |
| 410 | projectName, err := getProjectName(pipeline) |
| 411 | if err != nil { |
| 412 | return err |
| 413 | } |
| 414 | err = notification.PipelineStatusChanged(PipelineNotificationParam{ |
| 415 | ProjectName: projectName, |
| 416 | PipelineID: pipeline.ID, |
| 417 | CreatedAt: pipeline.CreatedAt, |
| 418 | UpdatedAt: pipeline.UpdatedAt, |
| 419 | BeganAt: pipeline.BeganAt, |
| 420 | FinishedAt: pipeline.FinishedAt, |
| 421 | Status: pipeline.Status, |
| 422 | }) |
| 423 | if err != nil { |
| 424 | globalPipelineLog.Error(err, "failed to send notification: %v", err) |
| 425 | return err |
| 426 | } |
| 427 | return nil |
| 428 | } |
| 429 | |
| 430 | // CancelPipeline FIXME ... |
| 431 | func CancelPipeline(pipelineId uint64) errors.Error { |
no test coverage detected