0
0
forked from toolshed/abra

fix: drop swarmkit/etcd dep

Part of coop-cloud/go-abra#57.
This commit is contained in:
2021-09-04 21:08:14 +02:00
parent f65090bd2f
commit da049ad69a
9 changed files with 27 additions and 25 deletions

View File

@ -7,8 +7,7 @@ import (
"unicode"
abraClient "coopcloud.tech/abra/client"
"github.com/docker/cli/cli/command/stack/options"
"github.com/docker/cli/cli/compose/convert"
"coopcloud.tech/abra/client/convert"
composetypes "github.com/docker/cli/cli/compose/types"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
@ -161,7 +160,7 @@ const (
)
// RunDeploy is the swarm implementation of docker stack deploy
func RunDeploy(cl *apiclient.Client, opts options.Deploy, cfg *composetypes.Config) error {
func RunDeploy(cl *apiclient.Client, opts Deploy, cfg *composetypes.Config) error {
ctx := context.Background()
if err := validateResolveImageFlag(&opts); err != nil {
@ -177,7 +176,7 @@ func RunDeploy(cl *apiclient.Client, opts options.Deploy, cfg *composetypes.Conf
}
// validateResolveImageFlag validates the opts.resolveImage command line option
func validateResolveImageFlag(opts *options.Deploy) error {
func validateResolveImageFlag(opts *Deploy) error {
switch opts.ResolveImage {
case ResolveImageAlways, ResolveImageChanged, ResolveImageNever:
return nil
@ -186,7 +185,7 @@ func validateResolveImageFlag(opts *options.Deploy) error {
}
}
func deployCompose(ctx context.Context, cl *apiclient.Client, opts options.Deploy, config *composetypes.Config) error {
func deployCompose(ctx context.Context, cl *apiclient.Client, opts Deploy, config *composetypes.Config) error {
if err := checkDaemonIsSwarmManagerViaClient(ctx, cl); err != nil {
return err
}