fix(deploy): only output when actually waiting
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
465827d5ee
commit
1a8dca9804
|
@ -208,16 +208,23 @@ func deployCompose(ctx context.Context, cl *dockerClient.Client, opts Deploy, co
|
|||
return err
|
||||
}
|
||||
|
||||
serviceIDs, err := deployServices(ctx, cl, services, namespace, opts.SendRegistryAuth, opts.ResolveImage, appName, dontWait)
|
||||
serviceIDs, err := deployServices(ctx, cl, services, namespace, opts.SendRegistryAuth, opts.ResolveImage)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if dontWait {
|
||||
log.Warn("skipping converge logic checks")
|
||||
return nil
|
||||
}
|
||||
|
||||
log.Infof("waiting for %s to deploy... please hold 🤚", appName)
|
||||
|
||||
if err := waitOnServices(ctx, cl, serviceIDs, appName); err == nil {
|
||||
log.Infof("successfully deployed %s", appName)
|
||||
}
|
||||
return err
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func getServicesDeclaredNetworks(serviceConfigs []composetypes.ServiceConfig) map[string]struct{} {
|
||||
|
@ -332,9 +339,7 @@ func deployServices(
|
|||
services map[string]swarm.ServiceSpec,
|
||||
namespace convert.Namespace,
|
||||
sendAuth bool,
|
||||
resolveImage string,
|
||||
appName string,
|
||||
dontWait bool) ([]string, error) {
|
||||
resolveImage string) ([]string, error) {
|
||||
existingServices, err := GetStackServices(ctx, cl, namespace.Name())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -417,11 +422,6 @@ func deployServices(
|
|||
}
|
||||
}
|
||||
|
||||
if dontWait {
|
||||
log.Warn("skipping converge logic checks")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return serviceIDs, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue