Merge pull request #7209 from dokku/6919-failed-deployment-tasks

Exit non-zero if any deployment tasks fails
This commit is contained in:
Jose Diaz-Gonzalez
2024-09-29 01:09:47 -04:00
committed by GitHub
6 changed files with 149 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ package common
import (
"fmt"
"os"
"strconv"
"strings"
"time"
)
@@ -64,6 +65,17 @@ func ContainerWait(containerID string) bool {
if err != nil {
return false
}
stdout := result.StdoutContents()
if stdout != "0" {
exitCode, err := strconv.Atoi(stdout)
if err != nil {
return false
}
return exitCode == 0
}
return result.ExitCode == 0
}