take OOMkill into consideration
This commit is contained in:
parent
e70c11f06a
commit
807040abb5
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package engine
|
package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/drone/drone/shared/docker"
|
"github.com/drone/drone/shared/docker"
|
||||||
|
@ -66,6 +67,9 @@ func (w *worker) Build(name string, stdin []byte, pr bool) (_ int, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 1, err
|
return 1, err
|
||||||
}
|
}
|
||||||
|
if w.build.State.OOMKilled {
|
||||||
|
return 1, fmt.Sprintf("OOMKill received")
|
||||||
|
}
|
||||||
return w.build.State.ExitCode, err
|
return w.build.State.ExitCode, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue