diff --git a/server/queue.go b/server/queue.go index 25d44cb82..155b9c039 100644 --- a/server/queue.go +++ b/server/queue.go @@ -101,7 +101,14 @@ func HandleUpdate(c context.Context, message *stomp.Message) { client := stomp.MustFromContext(c) err = client.SendJSON("/topic/events", model.Event{ - Type: model.Started, + Type: func() model.EventType { + // HACK we don't even really care about the event type. + // so we should just simplify how events are triggered. + if job.Status == model.StatusRunning { + return model.Started + } + return model.Finished + }(), Repo: *work.Repo, Build: *build, Job: *job, diff --git a/yaml/transform/clone.go b/yaml/transform/clone.go index a54406714..60c1e2094 100644 --- a/yaml/transform/clone.go +++ b/yaml/transform/clone.go @@ -6,8 +6,11 @@ const clone = "clone" // Clone transforms the Yaml to include a clone step. func Clone(c *yaml.Config, plugin string) error { - if plugin == "" { - plugin = "plugins/git" + switch plugin { + case "", "git": + plugin = "plugins/git:latest" + case "hg": + plugin = "plugins/hg:latest" } for _, p := range c.Pipeline {