mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-01 21:28:44 +00:00
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)
|
client := stomp.MustFromContext(c)
|
||||||
err = client.SendJSON("/topic/events", model.Event{
|
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,
|
Repo: *work.Repo,
|
||||||
Build: *build,
|
Build: *build,
|
||||||
Job: *job,
|
Job: *job,
|
||||||
|
|
|
@ -6,8 +6,11 @@ const clone = "clone"
|
||||||
|
|
||||||
// Clone transforms the Yaml to include a clone step.
|
// Clone transforms the Yaml to include a clone step.
|
||||||
func Clone(c *yaml.Config, plugin string) error {
|
func Clone(c *yaml.Config, plugin string) error {
|
||||||
if plugin == "" {
|
switch plugin {
|
||||||
plugin = "plugins/git"
|
case "", "git":
|
||||||
|
plugin = "plugins/git:latest"
|
||||||
|
case "hg":
|
||||||
|
plugin = "plugins/hg:latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, p := range c.Pipeline {
|
for _, p := range c.Pipeline {
|
||||||
|
|
Loading…
Reference in a new issue