fixed git clone issue
This commit is contained in:
parent
66aa18922f
commit
17a77127b6
2 changed files with 13 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue