Commit graph

37006 commits

Author SHA1 Message Date
Sebastiaan van Stijn
63966dec02
Jenkinsfile: inline janky steps, and move validate to separate stage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f411be2072)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:08 +02:00
Sebastiaan van Stijn
997037964e
Jenkinsfile: remove .git mount in stages that don't use it
The .git mount is only needed for the DCO check, and for building
the binaries if `DOCKER_GITCOMMIT` is not set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 47ac8a97de)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:06 +02:00
Sebastiaan van Stijn
7a82829520
Jenkinsfile: consistent indentation and order of env-vars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f814e04652)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:04 +02:00
Sebastiaan van Stijn
678121ef05
Jenkinsfile: remove unused GIT_SHA1 env-var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0634816c0c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:01 +02:00
Sebastiaan van Stijn
970fb3c1df
Jenkinsfile: move building e2e image to "unit-vendor" stage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit efacee1cdd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:59 +02:00
Sebastiaan van Stijn
04ca2e6b92
Jenkinsfile: extract DOCKER_GRAPHDRIVER as environment variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 781e79d1fa)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:57 +02:00
Sebastiaan van Stijn
8dbb761fad
Jenkinsfile: use overlay2 for Power and s390x as well
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c75d7e0e22)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:55 +02:00
Sebastiaan van Stijn
0a5ea9d310
Jenkinsfile: run check-config.sh to print system configuration
Having this information can help debugging issues in CI (which could
be caused by missing/incorrect configuration of the machines).

We ping to a fixed version of the script, because this script is ran
directly on the host, and we don't want pull-requests modifying this
script to have direct access to the machines.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a2ad56dfad)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:53 +02:00
Sebastiaan van Stijn
c94dca16fa
Jenkinsfile: remove ip_vs modprobe for unit/vendor stage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6523ced950)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:50 +02:00
Sebastiaan van Stijn
cbbff33086
Jenkinsfile: standardize cointainer names and fix s390x cleanup
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f2e09afff4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:48 +02:00
Sebastiaan van Stijn
949708a745
Jenkinsfile: combine "vendor" and "unit tests"
Both of these tests are fairly short, and shouldn't interfer with
eachother, so we can combine them and re-use the same dev-image
(so that it'll only be built once).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f51c139792)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:46 +02:00
Sebastiaan van Stijn
b81c762493
Jenkinsfile: use GIT_COMMIT from Git plugin instead of manually
This patch removes the manual steps to resolve the Git commit, and
instead, uses the `GIT_COMMIT` that's set by Jenkins's Git plugin.

Behavior changes slightly, because `GIT_PLUGIN` contains the full
commit-sha, not the short one.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit be0e6e9d34)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:44 +02:00
Sebastiaan van Stijn
002bf3806e
Jenkinsfile: disable buildkit on power and s390x
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 355bcf6d48)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:35 +02:00
Sebastiaan van Stijn
337f0fc80d
Jenkinsfile: Add "info" step to all stages
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3897796548)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:32 +02:00
Sebastiaan van Stijn
c6a4351edd
Jenkinsfile: split some shell steps
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b04c769d65)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:30 +02:00
Sebastiaan van Stijn
b40359b551
Jenkinsfile: busybox is multi-arch
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9f0e10fe24)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:28 +02:00
Sebastiaan van Stijn
1d0821eee2
Jenkinsfile: remove arch-specific suffixes from names
Container and image names are already unique because they have
the git-sha or build-number, and a single machine won't be running
tests for multiple architectures.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 337d03a5f0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:26 +02:00
Sebastiaan van Stijn
37536cdfa4
Jenkinsfile: run "make clean" in cleanup step
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a0bf935f9c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:24 +02:00
Sebastiaan van Stijn
3040f3fdbb
Jenkinsfile: use sub-stages to describe steps
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 79713d8d07)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:22 +02:00
Sebastiaan van Stijn
ea508a8574
Jenkinsfile: set DOCKER_BUILDKIT globally
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f648964875)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:20 +02:00
Sebastiaan van Stijn
d974674126
Jenkinsfile: set APT_MIRROR globally
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a28f2a2338)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:18 +02:00
Sebastiaan van Stijn
31cb280682
Jenkinsfile: remove check for arch-specific Dockerfiles
The main Dockerfile is multi-arch now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 61fd8b7384)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:16 +02:00
Sebastiaan van Stijn
de941c990e
Jenkinsfile: remove build --rm, because it's the default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 722d582c92)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:14 +02:00
Sebastiaan van Stijn
5da534d8db
Jenkinsfile: consistently indent with 4 spaces
From the code style guidelines;
https://wiki.jenkins.io/display/JENKINS/Code+Style+Guidelines

> 1. Use spaces. Tabs are banned.
> 2. Java blocks are 4 spaces. JavaScript blocks as for Java. XML nesting is 2 spaces

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a95f16ca28)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:11 +02:00
Andrew Hsu
24144dbdc9
run unit tests and generate junit report
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 42f0a0db75)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:04 +02:00
Brian Goff
da9289fb54
Improvements to the test runners
1. Use `go list` to get list of integration dirs to build. This means we
   do not need to have a valid `.go` in every subdirectory and also
   filters out other dirs like "bundles" which may have been created.
2. Add option to specify custom flags for integration and
   integration-cli. This is needed so both suites can be run AND set
   custom flags... since the cli suite does not support standard go
   flags.
3. Add options to skip an entire integration suite.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit abece9b562)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:57 +02:00
Michael Zhao
0b274cf18f
Set TIMEOUT according to os/arch.
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
(cherry picked from commit 790da6c223)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:52 +02:00
Andrew Hsu
55fc016efc
allow running of single integration test
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit c222c5ac6f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:45 +02:00
zelahi
5bed812503
ADDED changes to integrate with our new Jenkins ci
Signed-off-by: zelahi <elahi.zuhayr@gmail.com>
(cherry picked from commit 0ecd6ab30f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:39 +02:00
Andrew Hsu
3e266baca4
use overlay2 for janky and experimental checks
instead of vfs

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit ccfaf1ed92)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:33 +02:00
Andrew Hsu
191b03834a
remove DOCKER_EXECDRIVER from Jenkinsfile
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 9d98458fb7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:27 +02:00
Sebastiaan van Stijn
63e03b155f
Remove Codecov
Codecov has shown to be flaky, and calculate the wrong diff, in
addition, it doesn't show coverage for integration tests, which
makes the coverage report not useful.

Removing it for now, while we look at alternatives.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bd5c5373f1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:21 +02:00
Sebastiaan van Stijn
130c0746c1
Cleanup "address" when connecting over a UNIX socket
When connecting with the daemon using a UNIX socket, the HTTP hostname was set, based
on the socket location, which was generating some noise in the test-logs.

Given that the actual hostname is not important (the URL just has to be well-formed),
the hostname/address can be cleaned up to reduce the noise.

This patch strips the path from the `addr`, and keeps `<random-id>.sock` as address.

Before:

    daemon.go:329: [d15d31ba75501] error pinging daemon on start: Get http://%2Ftmp%2Fdocker-integration%2Fd15d31ba75501.sock/_ping: dial unix /tmp/docker-integration/d15d31ba75501.sock: connect: no such file or directory

After:

    daemon.go:329: [d15d31ba75501] error pinging daemon on start: Get http://d15d31ba75501.sock/_ping: dial unix /tmp/docker-integration/d15d31ba75501.sock: connect: no such file or directory

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 92e6e7dd5f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:14 +02:00
Sebastiaan van Stijn
624ff4fef4
integration: organize bundle directory per test
The test-integration/test=integration-cli directory contains
a directory for each daemon that was created during the integration
tests, which makes it a long list to browse through. In addition,
some tests spin up multiple daemons, and when debugging test-failures,
the daemon-logs often have to be looked at together.

This patch organizes the bundl directory to group daemon storage
locationos per test, making it easier to find information about
all the daemons that were used in a specific test.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9b5e78888d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:55:06 +02:00
Sebastiaan van Stijn
19fa3ab213
WIP Move docker-py tests first again
See if networking works if we run it first

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6aafe0fd9e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:54:55 +02:00
Sebastiaan van Stijn
ab68b5dd9a
docker-py: skip flaky tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 980f2813b4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:54:53 +02:00
Sebastiaan van Stijn
9ad75d26fc
docker-py: use host-network for nested build of docker-py
When building this image docker-in-docker, the DNS in the environment
may not be usable for the build-container, causing resolution to fail:

```
02:35:31 W: Failed to fetch http://deb.debian.org/debian/dists/jessie/Release.gpg  Temporary failure resolving 'deb.debian.org'
```

This patch detects if we're building from within a container, and if
so, skips creating a networking namespace for the build by using
`--network=host`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3c15cea650)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:54:51 +02:00
Sebastiaan van Stijn
c3a7556f73
docker-py: don't build --quiet is TESTDEBUG is set
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ba8f4c7994)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:54:49 +02:00
Sebastiaan van Stijn
89e812a1e6
Makefile: Allow passing DOCKER_TEST_HOST and TESTDEBUG to container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 968345bc5c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:54:47 +02:00
Sebastiaan van Stijn
e092ff3f74
Bump docker-py to 4.0.2, and run tests from upstream repository
This removes all the installation steps for docker-py from the
Dockerfile, and instead builds the upstream Dockerfile, and runs
docker-py tests in a container.

To test;

```
make test-docker-py

...

Removing bundles/

---> Making bundle: dynbinary (in bundles/dynbinary)
Building: bundles/dynbinary-daemon/dockerd-dev
Created binary: bundles/dynbinary-daemon/dockerd-dev

---> Making bundle: test-docker-py (in bundles/test-docker-py)
---> Making bundle: .integration-daemon-start (in bundles/test-docker-py)
Using test binary docker
Starting dockerd
INFO: Waiting for daemon to start...
.
INFO: Building docker-sdk-python3:3.7.0...
sha256:686428ae28479e9b5c8fdad1cadc9b7a39b462e66bd13a7e35bd79c6a152a402
INFO: Starting docker-py tests...
============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-4.1.0, py-1.8.0, pluggy-0.9.0
rootdir: /src, inifile: pytest.ini
plugins: timeout-1.3.3, cov-2.6.1
collected 359 items

tests/integration/api_build_test.py .......s....
....
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7bfe48cc00)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:54:45 +02:00
Akihiro Suda
2b33fe3512
hack: remove integration-cli-on-swarm
integration-on-swarm had unnecessary complexity and was too hard to
maintain. Also, it didn't support the new non-CLI integration test suite.

I'm now doing some experiments out of the repo using Kubernetes:
https://github.com/AkihiroSuda/kube-moby-integration

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit e7fbe8e457)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:54:38 +02:00
Sebastiaan van Stijn
93c18c73a3
Merge pull request #327 from tonistiigi/double-unmount-1903
[19.03] builder-next: avoid double unmounting mountable
2019-08-16 20:30:09 +02:00
Tonis Tiigi
cad2cd71b7 builder-next: avoid double unmounting mountable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 9ea2cf320a)
2019-08-15 22:45:08 -07:00
Sebastiaan van Stijn
96e086dc33
Merge pull request #326 from tonistiigi/update-buildkit-1903
[19.03] vendor: update buildkit to v0.6.1
2019-08-15 19:34:11 +02:00
Sebastiaan van Stijn
cddce2dfa7
Merge pull request #321 from dani-docker/19.03-bk-3945401
[19.03 backport] do not stop health check before sending signal
2019-08-15 16:16:58 +02:00
Tonis Tiigi
65f964aa6b vendor: update buildkit to v0.6.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e59b26087f)
2019-08-14 18:56:38 -07:00
Dani Louca
8fca769bd5 Fixing integration test
Signed-off-by: Dani Louca <dani.louca@docker.com>
(cherry picked from commit 614daf1171)
Signed-off-by: Dani Louca <dani.louca@docker.com>
2019-08-14 17:07:40 -04:00
Sebastiaan van Stijn
ef5dd6e46d Skip TestHealthKillContainer on Windows
This test is failing on Windows currently:

```
11:59:47 --- FAIL: TestHealthKillContainer (8.12s)
11:59:47     health_test.go:57: assertion failed: error is not nil: Error response from daemon: Invalid signal: SIGUSR1
``

That test was added recently in https://github.com/moby/moby/pull/39454, but
rewritten in a commit in the same PR:
f8aef6a92f

In that rewrite, there were some changes:

- originally it was skipped on Windows, but the rewritten test doesn't have that skip:

    ```go
    testRequires(c, DaemonIsLinux) // busybox doesn't work on Windows
    ```

- the original test used `SIGINT`, but the new one uses `SIGUSR1`

Analysis:

- The Error bubbles up from: 8e610b2b55/pkg/signal/signal.go (L29-L44)
- Interestingly; `ContainerKill` should validate if a signal is valid for the given platform, but somehow we don't hit that part; f1b5612f20/daemon/kill.go (L40-L48)
- Windows only looks to support 2 signals currently 8e610b2b55/pkg/signal/signal_windows.go (L17-L26)
- Upstream Golang looks to define `SIGINT` as well; 77f9b2728e/src/runtime/defs_windows.go (L44)
- This looks like the current list of Signals upstream in Go; 3b58ed4ad3/windows/types_windows.go (L52-L67)

```go
const (
	// More invented values for signals
	SIGHUP  = Signal(0x1)
	SIGINT  = Signal(0x2)
	SIGQUIT = Signal(0x3)
	SIGILL  = Signal(0x4)
	SIGTRAP = Signal(0x5)
	SIGABRT = Signal(0x6)
	SIGBUS  = Signal(0x7)
	SIGFPE  = Signal(0x8)
	SIGKILL = Signal(0x9)
	SIGSEGV = Signal(0xb)
	SIGPIPE = Signal(0xd)
	SIGALRM = Signal(0xe)
	SIGTERM = Signal(0xf)
)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit eeaa0b30d4)
Signed-off-by: Dani Louca <dani.louca@docker.com>
2019-08-14 17:07:39 -04:00
Brian Goff
8533594ad6 Move kill health test to integration
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit f8aef6a92f)
Signed-off-by: Dani Louca <dani.louca@docker.com>
2019-08-14 17:07:39 -04:00
Ruilin Li
32802bc7d9 do not stop health check before sending signal
Docker daemon always stops healthcheck before sending signal to a
container now. However, when we use "docker kill" to send signals
other than SIGTERM or SIGKILL to a container, such as SIGINT,
daemon still stops container health check though container process
handles the signal normally and continues to work.

Signed-off-by: Ruilin Li <liruilin4@huawei.com>
(cherry picked from commit da574f9343)
Signed-off-by: Dani Louca <dani.louca@docker.com>
2019-08-14 17:07:39 -04:00