Commit Graph

104 Commits

Author SHA1 Message Date
Ian Campbell 20c19830a9 Move versioning variables to a separate package.
This helps to avoid circular includes, by separating the pure data out from the
actual functionality in the cli subpackage, allowing other code which is
imported to access the data.

Signed-off-by: Ian Campbell <ijc@docker.com>
2019-01-29 11:26:40 +00:00
Ian Campbell 4f483276cf 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>
2018-12-17 14:32:38 +00:00
Kir Kolyshkin ee461303f9 scripts/build/osx: set CXX, too
In case go build will see a need to call C++ (rather than C)
compiler, CXX env var need to be properly set (to osxcross wrapper).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-10-11 01:15:33 -07:00
Akihiro Suda 9b148db87a connhelper: add e2e
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-09-30 10:24:34 +09:00
Daniel Hiltgen b7ec4a42d9 Review comments
Address code review comemnts and purge additional dead code.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit f250152bf4)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-09-21 15:43:00 -07:00
Daniel Hiltgen fd2f1b3b66 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>
2018-08-20 09:42:05 -07:00
Marco Vedovati 265dec037b Allow running `make help` without out-of-container warning
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-07-31 10:56:48 +02:00
Vincent Demeester 40650cfbd5
Merge pull request #1242 from cyphar/buildmode-pie
build: add -buildmode=pie
2018-07-31 10:09:11 +02:00
Aleksa Sarai 164e812b7a
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>
2018-07-30 19:34:01 +10:00
Vincent Demeester a522a78231
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>
2018-06-25 11:46:35 +02:00
Christopher Crone 6b38918ce4 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>
2018-05-29 13:39:31 +02:00
Daniel Nephin c0588a9c8f Remove filewatcher
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-20 20:13:27 -04:00
Vincent Demeester 10baa756b2
Remove unused powershell function
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-07 18:18:14 +01:00
Vincent Demeester 0cf2e6353a
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>
2018-03-07 18:18:13 +01:00
Vincent Demeester facb22573d
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>
2018-03-07 18:14:10 +01:00
Sebastiaan van Stijn 02e7b18fde
Add AUTHORS file and script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-02 17:00:22 +01:00
Tibor Vass 5f4c5f8bb6 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>
2017-12-07 02:04:10 +01:00
Sebastiaan van Stijn c6a3199236
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>
2017-11-13 19:01:35 +01:00
Daniel Nephin b11c11ea74 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>
2017-10-10 17:04:49 -04:00
Riyaz Faizullabhoy 46f3d8bb7f update image pull tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-10-10 11:20:54 -07:00
Daniel Nephin ade675d36c get e2e working with notary service
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-10-10 11:19:02 -07:00
Daniel Nephin ab2e219116 Fix e2e test by using a pinned version of alpine
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-14 11:38:46 -04:00
Victor Vieux d3d9b38d55 Merge pull request #511 from dnephin/fix-end-of-line-whitespace-tests
Use golden files for tests that expect end-of-line whitespace
2017-09-08 11:37:28 -07:00
Daniel Nephin 51587de1c4 Use golden files for tests that expect end-of-line whitespace
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-07 17:50:44 -04:00
Daniel Nephin c34360cc8e 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>
2017-09-06 17:07:38 -04:00
Daniel Nephin 26418a12fb Add scripts for setting up e2e test environment.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-16 10:35:56 -04:00
Daniel Nephin 703a7cca2b Merge pull request #354 from dnephin/warn-outside-container
Add a warning when make is run outside of a container
2017-08-14 14:10:12 -04:00
Daniel Nephin 12a7387c8e 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>
2017-07-26 15:58:15 -04:00
Jean-Pierre Huynh 24c06c1723 Add scripts folder to shellcheck
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-19 16:33:58 +01:00
Jean-Pierre Huynh b2fc35aefa Add shellcheck for bash completion
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-13 22:24:08 +01:00
Vincent Demeester e3746d388e Merge pull request #206 from dnephin/why-cross-so-slow
Faster CI
2017-07-13 09:36:18 +02:00
Daniel Nephin 102a8f0c9d 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>
2017-07-11 14:23:27 -04:00
Daniel Nephin 1eb66d60bd Add parallelism to cross build
Reusable docker engine

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-07-05 15:23:32 -04:00
Daniel Nephin 343d836a95 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>
2017-06-14 14:59:48 -07:00
Daniel Nephin 3a9ba545bc 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>
2017-06-14 10:57:36 -07:00
Daniel Nephin f75a44ffd8 Fix check-git-diff so that it fails on CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-06 15:06:34 -04:00
Tibor Vass dc81def89c fix manpages script
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-06 05:00:10 +00:00
Tibor Vass ff615dbc4d Add scripts and targets for manpages and yamldocs
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-05 19:10:44 +00:00
Vincent Demeester efaadcf465 Merge pull request #132 from mavenugo/stack-host
Host and Bridge network support in docker stack deploy
2017-05-31 15:07:56 -07:00
Daniel Nephin b7b7d784d8 Remove gox, add support for s390x
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-30 16:01:21 -04:00
Daniel Nephin 341703d21e Add tests for verifyExternalNetwork
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-26 12:21:04 -04:00
Daniel Nephin e47cc91ac9 Merge pull request #109 from vdemeester/codecov-in-circle
Add test-coverage & codecov target and update circleci
2017-05-23 11:59:05 -04:00
Andrew Hsu 3dfe334a7a allow version number to be set in builds
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-05-22 13:22:42 -07:00
Daniel Nephin f6d148c632 Upload coverage report from outside of test container.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-19 17:37:38 -04:00
Daniel Nephin 46049dd0b6 Enabled linux/ppc64le cross build.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-18 13:07:26 -04:00
John Stephens b28c4822cc Merge pull request #90 from dnephin/add-windows-autogen
Add windows resources to binary
2017-05-17 11:59:54 -07:00
Daniel Nephin 329f4e29c5 Remove unused windows resourcefiles.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-15 22:50:33 -04:00
Daniel Nephin 8a6ad48d2b Add windows resources to binary.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-15 18:03:03 -04:00
Daniel Nephin 74c06a140b Support running unit tests when files are saved.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-15 17:02:58 -04:00
Daniel Nephin 60b2dd3e23 Update the README
Remove referenced to developing on the host, we shouldn't support it.

Move script/validate to scripts/validate to be consistent.
Set the default target to be binary instead of clean.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-15 14:07:30 -04:00
Daniel Nephin a408fb0a61 osx cross
Fix CI build

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-13 13:47:00 -04:00
Daniel Nephin 84a77889c3 Add windows and linux cross.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-12 13:34:13 -04:00
Daniel Nephin a787cbc93b Support building a dynbinary
Cleanup dynbinary and binary builds

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-12 13:34:06 -04:00
Kenfe-Mickael Laventure cf51bde7d9 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>
2017-05-09 14:22:51 -07:00