diff --git a/bundle/run/pipeline.go b/bundle/run/pipeline.go index 070666a1f..f276737a1 100644 --- a/bundle/run/pipeline.go +++ b/bundle/run/pipeline.go @@ -172,8 +172,7 @@ func (r *pipelineRunner) Run(ctx context.Context, opts *Options) (RunOutput, err } // Log the pipeline update URL as soon as it is available. - updateUrl := fmt.Sprintf("%s/#joblist/pipelines/%s/updates/%s", w.Config.Host, pipelineID, updateID) - log.Infof(ctx, "Update available at %s", updateUrl) + progressLogger.Log(pipeline.NewUpdateUrlEvent(w.Config.Host, updateID, pipelineID)) // Poll update for completion and post status. // Note: there is no "StartUpdateAndWait" wrapper for this API. diff --git a/bundle/run/pipeline/events.go b/bundle/run/pipeline/events.go new file mode 100644 index 000000000..1ee234c4a --- /dev/null +++ b/bundle/run/pipeline/events.go @@ -0,0 +1,23 @@ +package pipeline + +import "fmt" + +type UpdateUrlEvent struct { + Type string `json:"type"` + UpdateId string `json:"update_id"` + PipelineId string `json:"pipeline_id"` + Url string `json:"url"` +} + +func NewUpdateUrlEvent(host, updateId, pipelineId string) *UpdateUrlEvent { + return &UpdateUrlEvent{ + Type: "update_url", + UpdateId: updateId, + PipelineId: pipelineId, + Url: fmt.Sprintf("%s/#joblist/pipelines/%s/updates/%s", host, pipelineId, updateId), + } +} + +func (event *UpdateUrlEvent) String() string { + return fmt.Sprintf("The update can be found at %s\n", event.Url) +}