Commit Graph

24 Commits

Author SHA1 Message Date
fb08bdcb4b Small content trust enhancement
- `replaceDockerfileForContentTrust` is only used when content trust is
  enabled, so remove the boolean.
- rename `isContentTrustEnabled` to `contentTrustEnabled`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 63ebcae382
Component: cli
2018-03-14 17:55:19 +01:00
5e391186a8 Refactor content_trust cli/flags handling
Remove the global variable used. Allows easier unit testing.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6e21829af4
Component: cli
2018-03-08 15:00:43 -05:00
ef941c7ad3 Convert assert.Check(t, is.Error()) to assert.Error
git grep -l -P '^\s+assert\.Check\(t, is\.Error\(' | \
    xargs perl -pi -e 's/^(\s+assert\.)Check\(t, is\.Error\((.*)\)$/\1Error(t, \2/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e15b208e96
Component: cli
2018-03-06 16:00:28 -05:00
dd7eb35a89 Convert to assert.NilError
Using:

  git grep -l '^\s\+assert\.Check(t, err)$' | \
    xargs sed -i -e 's/^\(\s\+assert\)\.Check(t, err)$/\1.NilError(t, err)/'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: baf65a5502
Component: cli
2018-03-06 15:27:34 -05:00
ad1a2c9e1d Automated migration
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 39c2ca57c1
Component: cli
2018-03-05 19:41:17 -05:00
fe9a519a3b Annotate "stack" commands to be "swarm" and "kubernetes"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 93c36eb228
Component: cli
2018-01-22 15:44:47 -08:00
4db79d6583 golint: remove redundant ifs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d845b4d36a
Component: cli
2018-01-13 13:16:34 +01:00
3e3e540e8d Fix PR comments
- More strict on orchestrator flag
- Make orchestrator flag more explicit as experimental
- Add experimentalCLI annotation on kubernetes flags
- Better kubeconfig error message
- Prefix service name with stackname in ps and services stack subcommands
- Fix yaml documentation
- Fix code coverage ignoring generated code

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: f1b116179f
Component: cli
2018-01-03 10:23:32 +01:00
cb8fda044c Activate kubernetes only when experimental cli is enabled
* Refactor tests on version and kubernetes switch
* Fix rebase errors
* Refactor for gocyclo linter

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Upstream-commit: ad409767bf
Component: cli
2017-12-28 14:40:10 +01:00
effda473ed Set a global orchestrator flag
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5d375b348a
Component: cli
2017-12-28 14:40:10 +01:00
baa35d70b2 Refactor stack command
- Define command and subcommands only once
- Use annotations for k8s or swarm specific flags or subcommands

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dedd0db51a
Component: cli
2017-12-26 11:45:56 +01:00
2a46f74679 Add support for experimental Cli configuration
Allow to mark some commands and flags experimental on cli (i.e. not
depending to the state of the daemon). This will allow more flexibility
on experimentation with the cli.

Marking `docker trust` as cli experimental as it is documented so.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 84fe1a1b5b
Component: cli
2017-12-22 14:48:47 +01:00
293c21ca60 Remove deprecated "daemon" subcommand
The `docker daemon` subcommand was only present for
backward compatibility, but deprecated in v1.13,
and scheduled for removal in v17.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c6a3199236
Component: cli
2017-11-13 19:01:35 +01:00
2e5b6e24c7 Update code for upstream cobra
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4205416c9b
Component: cli
2017-10-25 14:49:26 -04:00
4bafd44516 updated vendoring
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: a0113c3a44
Component: cli
2017-09-01 19:41:06 -04:00
2bf9a1e1f5 fixed the output leak from daemon unit tests
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 69b226a89c
Component: cli
2017-06-27 14:22:49 -04:00
d7802c7d2b Add windows resources to binary.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8a6ad48d2b
Component: cli
2017-05-15 18:03:03 -04:00
bfb4425b6f Display proper version information
- The cli version defaults to "unknown-version" unless set via the VERSION env var
- The commit version can be overridden via GITCOMMIT env var
- The build time can be overridden via BUILDTIME env var

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: cf51bde7d9
Component: cli
2017-05-09 14:22:51 -07:00
edf78faba7 Add interfacer linter
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 37ccc00d0e
Component: cli
2017-05-08 15:57:50 -04:00
82b8acb640 rm client and vendor it instead
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 57230a7212
Component: cli
2017-05-08 10:33:56 -07:00
8ef7f9b38c windows: remove workaround for go#15286 and have compiling work on windows
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 97a4da4cf1
Component: cli
2017-04-25 15:53:23 -07:00
c0890fae22 Add a Dockerfile for building and testing.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: b6cba06801
Component: cli
2017-04-18 19:12:24 -04:00
82309a74cd Update imports.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 10641c2aae
Component: cli
2017-04-17 18:07:56 -04:00
0890ccc8cb Import docker/docker/cmd/docker
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: cdd7bc516b
Component: cli
2017-04-17 17:44:40 -04:00