Skip to content

Commit

Permalink
Revert: Don't stop JobContainer on failure (nektos#1041)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHX authored Mar 14, 2022
1 parent 1e92d87 commit 4d71071
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 4 additions & 5 deletions pkg/runner/job_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ func newJobExecutor(info jobInfo) common.Executor {
}

steps = append(steps, func(ctx context.Context) error {
err := info.stopContainer()(ctx)
if err != nil {
return err
}

jobError := common.JobError(ctx)
if jobError != nil {
info.result("failure")
} else {
err := info.stopContainer()(ctx)
if err != nil {
return err
}
info.result("success")
}

Expand Down
1 change: 0 additions & 1 deletion pkg/runner/job_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ func TestNewJobExecutor(t *testing.T) {
executedSteps: []string{
"startContainer",
"step1",
"stopContainer",
"interpolateOutputs",
"closeContainer",
},
Expand Down

0 comments on commit 4d71071

Please sign in to comment.