Commit Graph

217 Commits

Author SHA1 Message Date
Silvin Lubecki 3bd3996f72 Use gotest.tools/gotestsum binary to run unit and e2e tests and simplify the output.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2019-02-01 11:16:20 +01:00
Ian Campbell 5db336798c Add some simple e2e tests for executing CLI plugins
To help with this add a bad plugin which produces invalid metadata and arrange
for it to be built in the e2e container.

Signed-off-by: Ian Campbell <ijc@docker.com>
2019-01-30 13:44:05 +00:00
Ian Campbell e96240427f Add basic framework for writing a CLI plugin
That is, the helper to be used from the plugin's `main`.

Also add a `helloworld` plugin example and build integration.

Signed-off-by: Ian Campbell <ijc@docker.com>
2019-01-29 11:26:40 +00:00
Sebastiaan van Stijn 0e9d1d3b07
Bump Golang 1.11.5 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.11.5+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-24 02:50:10 +01:00
Sebastiaan van Stijn deaf6e13ab
Bump Golang 1.11.4 (includes fix for CVE-2018-16875)
go1.11.4 (released 2018/12/14) includes fixes to cgo, the compiler, linker,
runtime, documentation, go command, and the net/http and go/types packages. It
includes a fix to a bug introduced in Go 1.11.3 that broke go get for import
path patterns containing "...".

See the Go 1.11.4 milestone for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.4+label%3ACherryPickApproved

go1.11.3 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.11.3 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-19 12:55:59 +01:00
Sebastiaan van Stijn 58f0bfcf51
Bump Go to 1.11.2
go1.11.2 (released 2018/11/02) includes fixes to the compiler, linker,
documentation, go command, and the database/sql and go/types packages.

See the milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-11 12:19:16 +01:00
Sebastiaan van Stijn 166856ab1b
Do not patch Dockerfiles in CI
When building the Dockerfiles for development, those images are mainly used to
create a reproducible build-environment. The source code is bind-mounted into
the image at runtime; there is no need to create an image with the actual
source code, and copying the source code into the image would lead to a new
image being created for each code-change (possibly leading up to many "dangling"
images for previous code-changes).

However, when building (and using) the development images in CI, bind-mounting
is not an option, because the daemon is running remotely.

To make this work, the circle-ci script patched the Dockerfiles when CI is run;
adding a `COPY` to the respective Dockerfiles.

Patching Dockerfiles is not really a "best practice" and, even though the source
code does not and up in the image, the source would still be _sent_ to the daemon
for each build (unless BuildKit is used).

This patch updates the makefiles, circle-ci script, and Dockerfiles;

- When building the Dockerfiles locally, pipe the Dockerfile through stdin.
  Doing so, prevents the build-context from being sent to the daemon. This speeds
  up the build, and doesn't fill up the Docker "temp" directory with content that's
  not used
- Now that no content is sent, add the COPY instructions to the Dockerfiles, and
  remove the code in the circle-ci script to "live patch" the Dockerfiles.

Before this patch is applied (with cache):

```
$ time make -f docker.Makefile build_shell_validate_image
docker build -t docker-cli-shell-validate -f ./dockerfiles/Dockerfile.shellcheck .
Sending build context to Docker daemon     41MB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

2.75 real         0.45 user         0.56 sys
```

After this patch is applied (with cache)::

```
$ time make -f docker.Makefile build_shell_validate_image
cat ./dockerfiles/Dockerfile.shellcheck | docker build -t docker-cli-shell-validate -
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

0.33 real         0.07 user         0.08 sys
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-11-29 10:44:14 +01:00
Kir Kolyshkin 9412739186 Bump Go to 1.11.1
Release notes: https://golang.org/doc/devel/release.html#go1.11

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-10-11 01:54:19 -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
Sebastiaan van Stijn 44ca0901d1
Bump Go to 1.10.4
Includes fixes to the go command, linker, and the net/http, mime/multipart,
ld/macho, bytes, and strings packages. See the Go 1.10.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.10.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-28 12:08:52 +02: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
Sebastiaan van Stijn f3811e865e
Update gometalinter to v2.0.6 and remove alexkohler/nakedret
alexkohler/nakedret is now installed by default with gometalinter,
so it's no longer needed to install this manually

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-13 11:17:43 +02:00
Sebastiaan van Stijn 1c71c957cb
Bump Golang to 1.10.3
go1.10.3 (released 2018/06/05) includes fixes to the go command, and the
crypto/tls, crypto/x509, and strings packages. In particular, it adds minimal
support to the go command for the vgo transition. See the Go 1.10.3 milestone
on our issue tracker for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-06-11 11:13:13 -07: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
Vincent Demeester 08d6c18570
Update vndr commit to latest
Some fixes and it also preserves directories with *.c files now.

See a6e196d8b4...1fc68ee0c8

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-05-24 09:39:22 +02:00
Sebastiaan van Stijn ee7aa76cff
Bump Golang to 1.10.2
Go 1.10 release notes: https://golang.org/doc/go1.10

Go 1.10: https://github.com/golang/go/issues?q=milestone%3AGo1.10
Go 1.10.1: https://github.com/golang/go/issues?q=milestone%3AGo1.10.1
Go 1.10.2: https://github.com/golang/go/issues?q=milestone%3AGo1.10.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-14 16:04:13 +02:00
Sebastiaan van Stijn d3b8ceb52c
Bump Golang to 1.9.5
go1.9.5 (released 2018/03/28) includes fixes to the compiler, go command, and
net/http/pprof package. See the Go 1.9.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.9.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-04-05 10:02:23 -07:00
Daniel Nephin c0588a9c8f Remove filewatcher
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-20 20:13:27 -04:00
Vincent Demeester 8b00c5cfd8
Add more content trust tests
Importing from moby's DockerTrustSuite tests.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-19 10:02:40 +01:00
Daniel Nephin b127b8d927 Replace go-bindata with esc
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-12 14:23:19 -05:00
Sebastiaan van Stijn b32599761f
Bump golang to 1.9.4
This fixes a vulnerability in `go get` (CVE-2018-6574, http://golang.org/issue/23672),
but shouldn't really affect our code, but it's good to keep in sync.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-08 00:56:12 -08:00
Christopher Jones d89f5fa731
Bump Go to 1.9.3
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2018-01-29 13:43:59 -05:00
Sebastiaan van Stijn ffc7648322
Bump Go to 1.9.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-24 14:25:13 -08:00
Daniel Nephin 02ca1c8573 Add dockerfile for building on non-amd64 platforms
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-01-18 13:16:58 -05:00
Vincent Demeester 6859a7387b
Bump Go to 1.9.2
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-11-29 09:16:03 +01:00
Sebastiaan van Stijn bc8282a235
Bump Go to 1.8.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-31 21:04:59 +01:00
Victor Vieux 50e1161744 Merge pull request #633 from seemethere/switch_to_multi_arch_images
Switch to golang:1.8.4-alpine3.6
2017-10-26 17:08:08 -07:00
Eli Uriegas 9d1d9f2fa3 Update to multi-arch image for golang
golang:1.8.4-alpine does not have multi-arch images available in the
manifest. (s390x, ppc64le, etc.)

This makes it so that if you are trying to compile on different
arches you aren't forced to have to write your own Dockerfile and can
instead use the one bundled with the CLI repo.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-10-26 11:42:13 -07:00
Daniel Nephin c0d004f7cf Update gometalinter
and enable the new WarnUnmatchedDirective to warn if a nolint is unnecessary.
remove some unnecessary nolint

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-10-26 12:21:02 -04:00
Daniel Nephin dbd96badb6 Add nakedret linter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-10-12 11:48:51 -04: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
Riyaz Faizullabhoy 6e3bafd06b update e2e tests for content trust tests
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-10-10 11:19:02 -07:00
Sebastiaan van Stijn 6b35e98a61
Bump Go to 1.8.4
Bumps the Go version used to 1.8.4, which contains security fixes;
https://groups.google.com/forum/#!topic/golang-announce/1hZYiemnkdE

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-05 18:43:33 +02:00
Sebastiaan van Stijn 368b639e7e
Bump vndr to a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384
Includes a fix to cleanup unused vendor-directories

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-09-29 14:58:05 +02:00
Daniel Nephin d956386b2d Update gometalinter
The update includes bug fixes in gometalinter and updates to linters, which
discovered more linter problems.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-26 12:33:35 -04:00
Daniel Nephin 63d76065bb Add a Jenkinsfile
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-16 10:46:43 -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 058733969c Set DISABLE_WARN_OUTSIDE_CONTAINER in the Dockerfile so that we don't spend 10s sleeping in CI
also add time to validate check

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-15 14:34:43 -04:00
Sebastiaan van Stijn 7a0b49df23
Add "build" dir to PATH in dev-container
This makes running the client easier inside
the container; allowing to use just `docker`
instead of `build/docker`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-05 03:24:21 +02:00
Daniel Nephin 0f91d9e6c4 Cleanup dockerfiles and circle
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-07-18 12:22:28 -04:00
Jean-Pierre Huynh ffe8509663 Fix code location when mounting to docker-cli-shell-validate
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-13 22:24:08 +01:00
Jean-Pierre Huynh 2e7d24cae8 Reword to remove ambiguity with go validate
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-13 22:24:08 +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 7a8f75a25a Update gometalinter
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-07-12 15:21:41 -04: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
Sebastiaan van Stijn 008785f5b5
pin vndr to 9909bb2b8a0b7ea464527b376dc50389c90df587
This make updating vndr a deliberate action, and
prevents updates to vndr from making the vendor
validation fail in CI.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-10 14:31:57 -07: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 4881ef507f Use a fork of gometalinter
Until https://github.com/alecthomas/gometalinter/pull/289 is merged.
This reduces the runtime of the linter by 50x

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-14 17:30:45 -07:00
Daniel Nephin 01e1e58ada Add unused linter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-14 16:54:27 -07:00
Vincent Demeester 4ffefe4a1f Merge pull request #115 from jsoref/spelling
Spelling
2017-06-14 09:58:55 +02:00
Stefan Scherer b38c49411b
Update golang 1.8.3
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
2017-06-09 21:43:00 +02: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
Josh Soref 70a9905ee5 Spelling fixes
* appropriate
* assumption
* attach
* because
* building
* customized
* mapping
* propagated

Signed-off-by: Josh Soref <jsoref@gmail.com>
2017-05-22 01:39:06 +00: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 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
Daniel Nephin ef1d58dd87 Add check for compose bindata.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-09 15:42:22 -04:00
Daniel Nephin 4aa65d9833 Run steps in parallel.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-08 15:57:56 -04:00
Daniel Nephin 31851fbe3c Verify that vendored files are correct
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-02 17:57:32 -04:00
Daniel Nephin e3f677794a Add gometalinter to CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-02 17:15:56 -04:00
Gaetan de Villele 4d4203f7fd add “test” target and make CI use it
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-27 15:57:35 -07:00
Gaetan de Villele 9c3f1d9ae3 add Dockerfile for CI
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-27 13:36:29 -07:00
Gaetan de Villele fb413981d3 add Makefiles and document their use in the README
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-04-25 09:57:06 -07:00
Daniel Nephin b6cba06801 Add a Dockerfile for building and testing.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-04-18 19:12:24 -04:00