Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions cli/command/bundlefile/bundlefile.go

This file was deleted.

78 changes: 0 additions & 78 deletions cli/command/bundlefile/bundlefile_test.go

This file was deleted.

1 change: 0 additions & 1 deletion cli/command/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
context.NewContextCommand(dockerCli),

// legacy commands may be hidden
hide(stack.NewTopLevelDeployCommand(dockerCli)),
hide(system.NewEventsCommand(dockerCli)),
hide(system.NewInfoCommand(dockerCli)),
hide(system.NewInspectCommand(dockerCli)),
Expand Down
12 changes: 0 additions & 12 deletions cli/command/stack/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,6 @@ func NewStackCommand(dockerCli command.Cli) *cobra.Command {
return cmd
}

// NewTopLevelDeployCommand returns a command for `docker deploy`
func NewTopLevelDeployCommand(dockerCli command.Cli) *cobra.Command {
cmd := newDeployCommand(dockerCli, nil)
// Remove the aliases at the top level
cmd.Aliases = []string{}
cmd.Annotations = map[string]string{
"experimental": "",
"version": "1.25",
}
return cmd
}

func getOrchestrator(dockerCli command.Cli, cmd *cobra.Command) (command.Orchestrator, error) {
var orchestratorFlag string
if o, err := cmd.Flags().GetString("orchestrator"); err == nil {
Expand Down
24 changes: 0 additions & 24 deletions cli/command/stack/deploy.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package stack

import (
"context"

"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/stack/kubernetes"
"github.com/docker/cli/cli/command/stack/loader"
"github.com/docker/cli/cli/command/stack/options"
"github.com/docker/cli/cli/command/stack/swarm"
composetypes "github.com/docker/cli/cli/compose/types"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
Expand All @@ -28,24 +25,6 @@ func newDeployCommand(dockerCli command.Cli, common *commonOptions) *cobra.Comma
if err := validateStackName(opts.Namespace); err != nil {
return err
}

commonOrchestrator := command.OrchestratorSwarm // default for top-level deploy command
if common != nil {
commonOrchestrator = common.orchestrator
}

switch {
case opts.Bundlefile == "" && len(opts.Composefiles) == 0:
return errors.Errorf("Please specify either a bundle file (with --bundle-file) or a Compose file (with --compose-file).")
case opts.Bundlefile != "" && len(opts.Composefiles) != 0:
return errors.Errorf("You cannot specify both a bundle file and a Compose file.")
case opts.Bundlefile != "":
if commonOrchestrator != command.OrchestratorSwarm {
return errors.Errorf("bundle files are not supported on another orchestrator than swarm.")
}
return swarm.DeployBundle(context.Background(), dockerCli, opts)
}

config, err := loader.LoadComposefile(dockerCli, opts)
if err != nil {
return err
Expand All @@ -55,9 +34,6 @@ func newDeployCommand(dockerCli command.Cli, common *commonOptions) *cobra.Comma
}

flags := cmd.Flags()
flags.StringVar(&opts.Bundlefile, "bundle-file", "", "Path to a Distributed Application Bundle file")
flags.SetAnnotation("bundle-file", "experimental", nil)
flags.SetAnnotation("bundle-file", "swarm", nil)
flags.StringSliceVarP(&opts.Composefiles, "compose-file", "c", []string{}, `Path to a Compose file, or "-" to read from stdin`)
flags.SetAnnotation("compose-file", "version", []string{"1.25"})
flags.BoolVar(&opts.SendRegistryAuth, "with-registry-auth", false, "Send registry authentication details to Swarm agents")
Expand Down
2 changes: 1 addition & 1 deletion cli/command/stack/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func getConfigDetails(composefiles []string, stdin io.Reader) (composetypes.Conf
var details composetypes.ConfigDetails

if len(composefiles) == 0 {
return details, errors.New("no composefile(s)")
return details, errors.New("Please specify a Compose file (with --compose-file)")
}

if composefiles[0] == "-" && len(composefiles) == 1 {
Expand Down
1 change: 0 additions & 1 deletion cli/command/stack/options/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import "github.com/docker/cli/opts"

// Deploy holds docker stack deploy options
type Deploy struct {
Bundlefile string
Composefiles []string
Namespace string
ResolveImage string
Expand Down
124 changes: 0 additions & 124 deletions cli/command/stack/swarm/deploy_bundlefile.go

This file was deleted.

Loading