mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
Revert: Don't stop JobContainer on failure (#1041)
This commit is contained in:
parent
37296c2586
commit
f31d7fe160
2 changed files with 4 additions and 6 deletions
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,6 @@ func TestNewJobExecutor(t *testing.T) {
|
||||||
executedSteps: []string{
|
executedSteps: []string{
|
||||||
"startContainer",
|
"startContainer",
|
||||||
"step1",
|
"step1",
|
||||||
"stopContainer",
|
|
||||||
"interpolateOutputs",
|
"interpolateOutputs",
|
||||||
"closeContainer",
|
"closeContainer",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue