mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 12:21:03 +00:00
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
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"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 {
|
||||
return 1, err
|
||||
}
|
||||
if w.build.State.OOMKilled {
|
||||
return 1, fmt.Sprintf("OOMKill received")
|
||||
}
|
||||
return w.build.State.ExitCode, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue