Commit Graph

55 Commits

Author SHA1 Message Date
4dba9e73a5 Update to shellcheck v0.6.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ff107b313a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9a5296c8f1
Component: cli
2019-03-26 14:33:39 +01:00
6006ae7e52 Use official shellcheck image
This patch switches the shellcheck image to use the official image
from Docker Hub.

Note that this does not yet update shellcheck to the latest version (v0.5.x);
Shellcheck v0.4.7 added some new checks, which makes CI currently fail, so will
be done in a follow-up PR. Instead, the v0.4.6 version is used in this PR, which
is closest to the same version as was installed in the image before this change;

```
docker run --rm docker-cli-shell-validate shellcheck --version
ShellCheck - shell script analysis tool
version: 0.4.4
license: GNU General Public License, version 3
website: http://www.shellcheck.net
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 388646eab0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b59752479b
Component: cli
2019-03-26 14:26:45 +01:00
2c6914129c Fix: plugin-tests discarding current environment
By default, exec uses the environment of the current process, however,
if `exec.Env` is not `nil`, the environment is discarded:

e73f489494/src/os/exec/exec.go (L57-L60)

> If Env is nil, the new process uses the current process's environment.

When adding a new environment variable, prepend the current environment,
to make sure it is not discarded.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6c4fbb7738)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fc8717799f
Component: cli
2019-03-17 15:47:28 +01:00
7e7a37e63e e2e: assign a default value of 0 to DOCKERD_EXPERIMENTAL
Currently running the e2e tests produces a warning/error:

    $ make -f docker.Makefile test-e2e
    «...»
    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock docker-cli-e2e
    ./scripts/test/e2e/run: line 20: test: : integer expression expected

This is from:

    test "${DOCKERD_EXPERIMENTAL:-}" -eq "1" && «...»

Where `${DOCKERD_EXPERIMENTAL:-}` expands to the empty string, resulting in
`test "" -eq "1"` which produces the warning. This error is enough to trigger
the short-circuiting behaviour of `&&` so the result is as expected, but fix
the issue nonetheless by provdiing a default `0`.

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 4f483276cf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c462e06fcd
Component: cli
2018-12-17 17:23:04 +01:00
130caf6e0e connhelper: add e2e
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 9b148db87a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 719508a935
Component: cli
2018-12-17 17:22:58 +01:00
e5e1355bb7 Review comments
Address code review comemnts and purge additional dead code.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: f250152bf4
Component: cli
2018-09-20 12:01:20 -07:00
f4a7b44342 Add engine commands built on containerd
This new collection of commands supports initializing a local
engine using containerd, updating that engine, and activating
the EE product

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: fd2f1b3b66
Component: cli
2018-08-20 09:42:05 -07:00
04c5e8c6df Allow running make help without out-of-container warning
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Upstream-commit: 265dec037b
Component: cli
2018-07-31 10:56:48 +02:00
a87b47f24d Merge pull request #1242 from cyphar/buildmode-pie
build: add -buildmode=pie
Upstream-commit: 40650cfbd5
Component: cli
2018-07-31 10:09:11 +02:00
4a40f4d761 build: add -buildmode=pie
Make all dynbinary builds be position-independent (this adds both
security benefits and can help with flaky builds on POWER
architectures).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 164e812b7a
Component: cli
2018-07-30 19:34:01 +10:00
23a1760da3 Make test-e2e run against experimental and non-experimental daemon
- `make test-e2e` runs the e2e tests twice : once against on
  non-experimental daemon (as before), once against an experimental
  daemon.
- adds `test-e2e-experimental` and `test-e2e-non-experimental` target
  to run tests for the specified cases

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a522a78231
Component: cli
2018-06-25 11:46:35 +02:00
35713286b5 Make e2e test image
- Build image that contains everything needed to run e2e tests
- Add ability to run e2e tests against an endpoint

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 6b38918ce4
Component: cli
2018-05-29 13:39:31 +02:00
3d78b27c6b Remove filewatcher
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c0588a9c8f
Component: cli
2018-03-20 20:13:27 -04:00
3d323d03af Remove unused powershell function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 10baa756b2
Component: cli
2018-03-07 18:18:14 +01:00
39e1627a66 Fixes some unit tests to be able to run them on windows
Some of them are skipped for now (because the feature is not supported
or needs more work), some of them are fixed.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0cf2e6353a
Component: cli
2018-03-07 18:18:13 +01:00
22b79a8c67 Add appveyor setup to build and unit test
Adds a `make.ps1` powershell script to make it easy to compile and test.

```
.\scripts\make.ps1 -Binary
INFO: make.ps1 starting at 03/01/2018 14:37:28
INFO: Building...

 ________   ____  __.
 \_____  \ |    |/ _|
 /   |   \|      <
 /    |    \    |  \
 \_______  /____|__ \
         \/        \/

INFO: make.ps1 ended at 03/01/2018 14:37:30

.\scripts\make.ps1 -TestUnit
```

The next step is to run e2e tests on windows too.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: facb22573d
Component: cli
2018-03-07 18:14:10 +01:00
f8a7c9aa17 Add AUTHORS file and script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 02e7b18fde
Component: cli
2018-01-02 17:00:22 +01:00
aa9a4c4bff Add platform and its components to docker version output
The Server section of version output is now composed of an Engine
component and potentially more, based on what the /version endpoint
returns.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5f4c5f8bb6
Component: cli
2017-12-07 02:04:10 +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
66b3ea1c4e Update e2e test for image pull to check stdout
Also add TEST_DEBUG env variable for debugging E2E tests.
And change icmd environment helpers to fit the CmdOp interface os they
can be passed to 'icmd.RunCmd()'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b11c11ea74
Component: cli
2017-10-10 17:04:49 -04:00
697f2a54c7 update image pull tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: 46f3d8bb7f
Component: cli
2017-10-10 11:20:54 -07:00
8990f67e9c get e2e working with notary service
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ade675d36c
Component: cli
2017-10-10 11:19:02 -07:00
6c749ced41 Fix e2e test by using a pinned version of alpine
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ab2e219116
Component: cli
2017-09-14 11:38:46 -04:00
fbd21afa80 Merge pull request #511 from dnephin/fix-end-of-line-whitespace-tests
Use golden files for tests that expect end-of-line whitespace
Upstream-commit: d3d9b38d55
Component: cli
2017-09-08 11:37:28 -07:00
d7ed53048b Use golden files for tests that expect end-of-line whitespace
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 51587de1c4
Component: cli
2017-09-07 17:50:44 -04:00
4a595ff1d9 Add an end-to-end test for container run
for testing attach, remove, and pull image when missing.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c34360cc8e
Component: cli
2017-09-06 17:07:38 -04:00
581aa22bc8 Add scripts for setting up e2e test environment.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 26418a12fb
Component: cli
2017-08-16 10:35:56 -04:00
a3ff59d2d3 Merge pull request #354 from dnephin/warn-outside-container
Add a warning when make is run outside of a container
Upstream-commit: 703a7cca2b
Component: cli
2017-08-14 14:10:12 -04:00
8adcc1277a Add a warning when make is run outside of a container.
The warning can be disabled by setting the environment variable

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 12a7387c8e
Component: cli
2017-07-26 15:58:15 -04:00
c20d148cd4 Add scripts folder to shellcheck
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
Upstream-commit: 24c06c1723
Component: cli
2017-07-19 16:33:58 +01:00
a61c7f009e Add shellcheck for bash completion
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
Upstream-commit: b2fc35aefa
Component: cli
2017-07-13 22:24:08 +01:00
3c42375fa5 Merge pull request #206 from dnephin/why-cross-so-slow
Faster CI
Upstream-commit: e3746d388e
Component: cli
2017-07-13 09:36:18 +02:00
152c598ec8 Pin all tools used in the Dockerfiles
Also update gometalinter to use the official version. The update
found some new gosimple errors, which are fixed.

Also update the filewatcher script for the latest version of filewatcher.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 102a8f0c9d
Component: cli
2017-07-11 14:23:27 -04:00
5f5ef4ba5a Add parallelism to cross build
Reusable docker engine

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1eb66d60bd
Component: cli
2017-07-05 15:23:32 -04:00
1bcf02da4f Run docs and man generation in CI
Also cleanup the scripts a bit to be more consistent, and fail on errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 343d836a95
Component: cli
2017-06-14 14:59:48 -07:00
6ca362a6db Speed up testing with coverage
By running a 'go test -i' on all the packages first the overall runtime is significantly
decreased.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3a9ba545bc
Component: cli
2017-06-14 10:57:36 -07:00
3b7dc655ab Fix check-git-diff so that it fails on CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f75a44ffd8
Component: cli
2017-06-06 15:06:34 -04:00
9b7bef68dd fix manpages script
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: dc81def89c
Component: cli
2017-06-06 05:00:10 +00:00
4bf796daf6 Add scripts and targets for manpages and yamldocs
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ff615dbc4d
Component: cli
2017-06-05 19:10:44 +00:00
472b98cb50 Merge pull request #132 from mavenugo/stack-host
Host and Bridge network support in docker stack deploy
Upstream-commit: efaadcf465
Component: cli
2017-05-31 15:07:56 -07:00
ee28c840c7 Remove gox, add support for s390x
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b7b7d784d8
Component: cli
2017-05-30 16:01:21 -04:00
f257d783a4 Add tests for verifyExternalNetwork
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 341703d21e
Component: cli
2017-05-26 12:21:04 -04:00
79087a0823 Merge pull request #109 from vdemeester/codecov-in-circle
Add test-coverage & codecov target and update circleci
Upstream-commit: e47cc91ac9
Component: cli
2017-05-23 11:59:05 -04:00
1d9c61db3a allow version number to be set in builds
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 3dfe334a7a
Component: cli
2017-05-22 13:22:42 -07:00
f039c950a8 Upload coverage report from outside of test container.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f6d148c632
Component: cli
2017-05-19 17:37:38 -04:00
4d54b44919 Enabled linux/ppc64le cross build.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 46049dd0b6
Component: cli
2017-05-18 13:07:26 -04:00
dd8e5ae38a Merge pull request #90 from dnephin/add-windows-autogen
Add windows resources to binary
Upstream-commit: b28c4822cc
Component: cli
2017-05-17 11:59:54 -07:00
71cfdc53d3 Remove unused windows resourcefiles.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 329f4e29c5
Component: cli
2017-05-15 22:50:33 -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
473491581d Support running unit tests when files are saved.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 74c06a140b
Component: cli
2017-05-15 17:02:58 -04:00