From 8df397db9f507952e5f624180dc831768df20252 Mon Sep 17 00:00:00 2001 From: Mac Browning Date: Fri, 12 Feb 2016 13:22:13 -0500 Subject: [PATCH] mark incomplete builds as errors --- engine/engine.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/engine.go b/engine/engine.go index 29552f34..f3d0c0c2 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -329,6 +329,11 @@ func (e *engine) runJob(c context.Context, r *Task, updater *updater, client doc info, builderr := docker.Wait(client, name) switch { + case info.State.Running: + // A build unblocked before actually being completed. + log.Errorf("incomplete build: %s", name) + r.Job.ExitCode = 1 + r.Job.Status = model.StatusError case info.State.ExitCode == 128: r.Job.ExitCode = info.State.ExitCode r.Job.Status = model.StatusKilled