update job state when aborting job
@@ -38,6 +38,11 @@ func (s *stepStartInstance) Run(state multistep.StateBag) multistep.StepAction {
logWriter := state.Get("logWriter").(LogWriter)
logWriter.WriteAndClose([]byte(jobAbortErr.UserFacingErrorMessage()))
+ err = buildJob.Finish(FinishStateErrored)
+ if err != nil {
+ context.LoggerFromContext(ctx).WithField("err", err).WithField("state", FinishStateErrored).Error("couldn't mark job as finished")
+ }
+
return multistep.ActionHalt
}
