fix: exit non-zero if any deployment tasks fails

This commit is contained in:
Jose Diaz-Gonzalez
2024-09-28 22:24:06 -04:00
parent fcb66a43cc
commit b8b112cb7b
2 changed files with 137 additions and 0 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
}