Commit 19bd755a authored by Shinya Maeda's avatar Shinya Maeda

Fix format

parent bc412ff7
......@@ -394,10 +394,11 @@ func (b *Build) setTraceStatus(trace JobTrace, err error) {
if buildError, ok := err.(*BuildError); ok {
logger.SoftErrorln("Job failed:", err)
failureReason := ScriptFailure
if buildError.FailureReason != ScriptFailure {
failureReason = buildError.FailureReason
failureReason := buildError.FailureReason
if failureReason == "" {
failureReason = ScriptFailure
}
trace.Fail(err, failureReason)
return
......
......@@ -54,7 +54,7 @@ type ExecutorProvider interface {
}
type BuildError struct {
Inner error
Inner error
FailureReason JobFailureReason
}
......
......@@ -22,9 +22,9 @@ const (
)
const (
NoneFailure JobFailureReason = ""
ScriptFailure JobFailureReason = "script_failure"
RunnerSystemFailure JobFailureReason = "runner_system_failure"
NoneFailure JobFailureReason = ""
ScriptFailure JobFailureReason = "script_failure"
RunnerSystemFailure JobFailureReason = "runner_system_failure"
RunnerExecutionTimeout JobFailureReason = "runner_execution_timeout"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment