Skip empty sections in deploy overview
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -84,13 +84,25 @@ func DeployOverview(
|
||||
{i18n.G("ENV VERSION"), formatter.BoldDirtyDefault(envVersion)},
|
||||
{i18n.G("NEW DEPLOYMENT"), formatter.BoldDirtyDefault(toDeployVersion)},
|
||||
{"", ""},
|
||||
{i18n.G("SECRETS"), secrets},
|
||||
{"", ""},
|
||||
{i18n.G("CONFIGS"), configs},
|
||||
{"", ""},
|
||||
{i18n.G("IMAGES"), images},
|
||||
}
|
||||
|
||||
if len(secrets) > 0 {
|
||||
secretsRows := [][]string{
|
||||
{"", ""},
|
||||
{i18n.G("SECRETS"), secrets},
|
||||
}
|
||||
rows = append(rows, secretsRows...)
|
||||
}
|
||||
|
||||
if len(configs) > 0 {
|
||||
configsRows := [][]string{
|
||||
{"", ""},
|
||||
{i18n.G("CONFIGS"), configs},
|
||||
}
|
||||
rows = append(rows, configsRows...)
|
||||
}
|
||||
|
||||
deployType := getDeployType(deployedVersion, toDeployVersion)
|
||||
overview := formatter.CreateOverview(i18n.G("%s OVERVIEW", deployType), rows)
|
||||
|
||||
|
Reference in New Issue
Block a user