fix(deploy): only output when actually waiting
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
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
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if dontWait {
|
||||||
|
log.Warn("skipping converge logic checks")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
log.Infof("waiting for %s to deploy... please hold 🤚", appName)
|
log.Infof("waiting for %s to deploy... please hold 🤚", appName)
|
||||||
|
|
||||||
if err := waitOnServices(ctx, cl, serviceIDs, appName); err == nil {
|
if err := waitOnServices(ctx, cl, serviceIDs, appName); err == nil {
|
||||||
log.Infof("successfully deployed %s", appName)
|
log.Infof("successfully deployed %s", appName)
|
||||||
}
|
}
|
||||||
return err
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getServicesDeclaredNetworks(serviceConfigs []composetypes.ServiceConfig) map[string]struct{} {
|
func getServicesDeclaredNetworks(serviceConfigs []composetypes.ServiceConfig) map[string]struct{} {
|
||||||
@ -332,9 +339,7 @@ func deployServices(
|
|||||||
services map[string]swarm.ServiceSpec,
|
services map[string]swarm.ServiceSpec,
|
||||||
namespace convert.Namespace,
|
namespace convert.Namespace,
|
||||||
sendAuth bool,
|
sendAuth bool,
|
||||||
resolveImage string,
|
resolveImage string) ([]string, error) {
|
||||||
appName string,
|
|
||||||
dontWait bool) ([]string, error) {
|
|
||||||
existingServices, err := GetStackServices(ctx, cl, namespace.Name())
|
existingServices, err := GetStackServices(ctx, cl, namespace.Name())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -417,11 +422,6 @@ func deployServices(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if dontWait {
|
|
||||||
log.Warn("skipping converge logic checks")
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
return serviceIDs, nil
|
return serviceIDs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user