Revert: Don't stop JobContainer on failure ()

This commit is contained in:
ChristopherHX 2022-03-14 20:46:32 +01:00 committed by GitHub
parent 1e92d87b75
commit 4d7107161e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -53,15 +53,14 @@ func newJobExecutor(info jobInfo) common.Executor {
} }
steps = append(steps, func(ctx context.Context) error { steps = append(steps, func(ctx context.Context) error {
err := info.stopContainer()(ctx)
if err != nil {
return err
}
jobError := common.JobError(ctx) jobError := common.JobError(ctx)
if jobError != nil { if jobError != nil {
info.result("failure") info.result("failure")
} else { } else {
err := info.stopContainer()(ctx)
if err != nil {
return err
}
info.result("success") info.result("success")
} }

View file

@ -103,7 +103,6 @@ func TestNewJobExecutor(t *testing.T) {
executedSteps: []string{ executedSteps: []string{
"startContainer", "startContainer",
"step1", "step1",
"stopContainer",
"interpolateOutputs", "interpolateOutputs",
"closeContainer", "closeContainer",
}, },