diff --git a/cli/updater/updater.go b/cli/updater/updater.go index 2e5c47f6..9bfa0b9e 100644 --- a/cli/updater/updater.go +++ b/cli/updater/updater.go @@ -202,7 +202,8 @@ func getLatestUpgrade(cl *dockerclient.Client, stackName string, recipeName stri logrus.Debugf("no available upgrades for %s", stackName) return "" } - availableUpgrades = internal.ReverseStringList(availableUpgrades) + // Uncomment to select the next version instead of the last version + // availableUpgrades = internal.ReverseStringList(availableUpgrades) var chosenUpgrade string if len(availableUpgrades) > 0 { chosenUpgrade = availableUpgrades[len(availableUpgrades)-1] @@ -262,6 +263,7 @@ func getAvailableUpgrades(cl *dockerclient.Client, stackName string, recipeName availableUpgrades = append(availableUpgrades, version) } } + logrus.Debugf("Available updates for %s: %s", stackName, availableUpgrades) return availableUpgrades @@ -320,6 +322,7 @@ func createDeployConfig(recipeName string, stackName string, env config.AppEnv) // after the upgrade the deployment won't be in chaos state anymore config.SetChaosLabel(compose, stackName, false) config.SetRecipeLabel(compose, stackName, recipeName) + config.SetUpdateLabel(compose, stackName, env) return compose, deployOpts }