[Agent][Deploy] - fix deploy bugs
This commit is contained in:
@@ -115,11 +115,15 @@ func ApplyByKubectl(applyFilePath string, cmiiEnv string) bool {
|
||||
cmd.Env = append(os.Environ(), fmt.Sprintf("KUBECONFIG=%s", kubeconfig))
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.ErrorF("failed to apply resources in file %s: %v \n %s", applyFilePath, err, output)
|
||||
fmt.Println("failed apply file => " + applyFilePath)
|
||||
fmt.Println(string(output))
|
||||
fmt.Println()
|
||||
return false
|
||||
}
|
||||
|
||||
log.InfoF("successfully apply resources in file %s\n%s", applyFilePath, output)
|
||||
fmt.Println("success apply file => " + applyFilePath)
|
||||
fmt.Println(string(output))
|
||||
fmt.Println()
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user