Commit Graph

2956 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 351b131fe9 Update test engine version to 19.03.12
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-10 18:09:07 +02:00
Ville Skyttä 687f23afe4 Spelling fixes (#2571)
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2020-08-10 18:09:07 +02:00
Lucidiot 75ed0ecf5a Add device requests (#2471)
* Add DeviceRequest type

Signed-off-by: Erwan Rouchet <rouchet@teklia.com>

* Add device_requests kwarg in host config

Signed-off-by: Erwan Rouchet <rouchet@teklia.com>

* Add unit test for device requests

Signed-off-by: Erwan Rouchet <rouchet@teklia.com>

* Fix unit test

Signed-off-by: Erwan Rouchet <rouchet@teklia.com>

* Use parentheses for multiline import

Signed-off-by: Erwan Rouchet <rouchet@teklia.com>

* Create 1.40 client for device-requests test

Signed-off-by: Laurie O <laurie_opperman@hotmail.com>

Co-authored-by: Laurie O <laurie_opperman@hotmail.com>
Co-authored-by: Bastien Abadie <abadie@teklia.com>
2020-08-10 18:09:07 +02:00
Sebastiaan van Stijn 00213a274b Fix CreateContainerTest.test_invalid_log_driver_raises_exception
This test was updated in 7d92fbdee1, but
omitted the "error" prefix in the message, causing the test to fail;

    _________ CreateContainerTest.test_invalid_log_driver_raises_exception _________
    tests/integration/api_container_test.py:293: in test_invalid_log_driver_raises_exception
        assert excinfo.value.explanation in expected_msgs
    E   AssertionError: assert 'error looking up logging plugin asdf: plugin "asdf" not found' in ["logger: no log driver named 'asdf' is registered", 'looking up logging plugin asdf: plugin "asdf" not found']
    E    +  where 'error looking up logging plugin asdf: plugin "asdf" not found' = APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.39/containers/create')).explanation
    E    +    where APIError(HTTPError('400 Client Error: Bad Request for url: http+docker://localhost/v1.39/containers/create')) = <ExceptionInfo APIError tblen=6>.value

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-10 18:09:07 +02:00
Ofek Lev d8961ebf12 Upgrade Windows dependency
Signed-off-by: Ofek Lev <ofekmeister@gmail.com>
2020-08-10 18:09:07 +02:00
Mike Haboustak 4b4379a4c7 Add support for DriverOpts in EndpointConfig
Docker API 1.32 added support for providing options to a network driver
via EndpointConfig when connecting a container to a network.

Signed-off-by: Mike Haboustak <haboustak@gmail.com>
2020-08-10 18:09:07 +02:00
Ulysses Souza 10cea0d2a0 Update version to 4.3.0-dev
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-08-10 18:09:07 +02:00
aiordache 9bb7c20938 Make orchestrator field optional
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-08-10 18:07:27 +02:00
Ulysses Souza 0268b02351 Specify when to use `tls` on Context constructor
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-08-10 18:01:24 +02:00
Ulysses Souza a3b42309e9 Post release 4.2.0 update:
- Changelog
- Next Version

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-08-10 17:59:01 +02:00
Anca Iordache 424421a2b3 Implement context management, lifecycle and unittests.
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2020-08-10 17:57:52 +02:00
Till Riedel 908b4b3add obey Hostname Username Port and ProxyCommand settings from .ssh/config
Signed-off-by: Till Riedel <riedel@teco.edu>
2020-08-10 17:50:37 +02:00
Till Riedel 25a831165c set logging level of paramiko to warn
Signed-off-by: Till Riedel <riedel@teco.edu>
2020-08-10 17:48:54 +02:00
Sebastiaan van Stijn 341ae50b86 Update credentials-helpers to v0.6.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-10 17:39:21 +02:00
Ulysses Souza 7f11cd4179
Merge pull request #2608 from ulyssessouza/4.2.2-release
Bump 4.2.2 release
2020-06-30 18:16:22 +02:00
Ulysses Souza 3f1cb9e36f Bump 4.2.2
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2020-06-30 17:40:32 +02:00
aiordache 02d0051b79 Skip parsing non-docker endpoints
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-06-30 17:40:32 +02:00
Sebastiaan van Stijn 2c54188438 Jenkinsfile: update node selection labels
Make sure we use the LTS nodes, to prevent using machines that
we prepared with cgroups v2 (which is not yet supported by docker v19.03)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-30 17:40:32 +02:00
Ulysses Souza d40c061210 Update version after 4.2.1 release
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-30 17:40:32 +02:00
Ulysses Souza b22095f742
Merge pull request #2580 from ulyssessouza/4.2.1-release
Bump 4.2.1
2020-06-02 16:15:59 +02:00
Ulysses Souza 9923746095 Bump 4.2.1
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-02 15:53:06 +02:00
aiordache 67cad6842c add test for context load without orchestrator
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-06-02 15:52:25 +02:00
aiordache 31276df6a3 Make orchestrator field optional
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-06-02 15:52:25 +02:00
Ulysses Souza 105efa02a9 Specify when to use `tls` on Context constructor
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-02 15:52:25 +02:00
Wilson Júnior 9b59e49113 Fix tests to support both log plugin feedbacks
Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com>
Docker-DCO-1.1-Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com> (github: wpjunior)
2020-06-02 15:52:25 +02:00
Sebastiaan van Stijn 913d129dc9 Update test engine version to 19.03.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-02 15:52:25 +02:00
Sebastiaan van Stijn 9713227d7b Jenkinsfile: remove obsolete engine versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-02 15:52:25 +02:00
Sebastiaan van Stijn db6a2471f5 Use official docker:dind image instead of custom image
This replaces the custom dockerswarm/dind image with the official
dind images, which should provide the same functionality.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-02 15:52:25 +02:00
Sebastiaan van Stijn fd4526a7d3 xfail "docker top" tests, and adjust for alpine image
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-02 15:52:25 +02:00
Ulysses Souza 1d1532f0be
Merge pull request #2506 from ulyssessouza/4.2.0-release
4.2.0 release
2020-02-06 11:43:03 +01:00
Ulysses Souza ab5678469c Bump 4.2.0
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-02-06 10:41:28 +01:00
Anca Iordache 6e44d8422c Implement context management, lifecycle and unittests.
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2020-02-06 10:33:31 +01:00
Sebastiaan van Stijn 6c29375fd1 Fix ImageCollectionTest.test_pull_multiple flakiness
The ImageCollectionTest.test_pull_multiple test performs a `docker pull` without
a `:tag` specified) to pull all tags of the given repository (image).

After pulling the image, the image(s) pulled are checked to verify if the list
of images contains the `:latest` tag.

However, the test assumes that all tags of the image are tags for the same
version of the image (same digest), and thus a *single* image is returned, which
is not always the case.

Currently, the `hello-world:latest` and `hello-world:linux` tags point to a
different digest, therefore the `client.images.pull()` returns multiple images:
one image for digest, making the test fail:

    =================================== FAILURES ===================================
    ____________________ ImageCollectionTest.test_pull_multiple ____________________
    tests/integration/models_images_test.py:90: in test_pull_multiple
        assert len(images) == 1
    E   AssertionError: assert 2 == 1
    E    +  where 2 = len([<Image: 'hello-world:linux'>, <Image: 'hello-world:latest'>])

This patch updates the test to not assume a single image is returned, and instead
loop through the list of images and check if any of the images contains the
`:latest` tag.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-06 10:33:31 +01:00
Christopher Crone 9b0d07f9a8 Version bump
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-02-06 10:33:31 +01:00
rentu 61e2d5f69b Fix win32pipe.WaitNamedPipe throw exception in windows container.
Signed-off-by: Renlong Tu <rentu@microsoft.com>
2020-02-06 10:33:31 +01:00
Nicolas De Loof a67d180e2c Fix CI labels so we run on amd64 nodes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-02-06 10:33:31 +01:00
Till Riedel ed9b208e15 obey Hostname Username Port and ProxyCommand settings from .ssh/config
Signed-off-by: Till Riedel <riedel@teco.edu>
2020-02-06 10:33:31 +01:00
Till Riedel bc6777eb01 set host key policy for ssh transport to WarningPolicy()
Signed-off-by: Till Riedel <riedel@teco.edu>
2020-02-06 10:33:31 +01:00
Till Riedel 1e567223ef set logging level of paramiko to warn
Signed-off-by: Till Riedel <riedel@teco.edu>
2020-02-06 10:33:31 +01:00
Chris Crone 66495870de
Merge pull request #2443 from docker/4.1.0-release
4.1.0 release
2019-10-03 16:16:42 +02:00
Christopher Crone 2bb08b3985 Bump 4.1.0
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2019-10-03 15:49:27 +02:00
Kir Kolyshkin 88219c682c Bump pytest to 4.3.1
Pytest 4.3.1 includes the fix from

	https://github.com/pytest-dev/pytest/pull/4795

which should fix the following failure:

> INFO: Building docker-sdk-python3:4.0.2...
> sha256:c7a40413c985b6e75df324fae39b1c30cb78a25df71b7892f1a4a15449537fb3
> INFO: Starting docker-py tests...
> Traceback (most recent call last):
>   File "/usr/local/bin/pytest", line 10, in <module>
>     sys.exit(main())
>   File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 61, in main
>     config = _prepareconfig(args, plugins)
>   File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 182, in _prepareconfig
>     config = get_config()
>   File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 156, in get_config
>     pluginmanager.import_plugin(spec)
>   File "/usr/local/lib/python3.6/site-packages/_pytest/config/__init__.py", line 530, in import_plugin
>     __import__(importspec)
>   File "/usr/local/lib/python3.6/site-packages/_pytest/tmpdir.py", line 25, in <module>
>     class TempPathFactory(object):
>   File "/usr/local/lib/python3.6/site-packages/_pytest/tmpdir.py", line 35, in TempPathFactory
>     lambda p: Path(os.path.abspath(six.text_type(p)))
> TypeError: attrib() got an unexpected keyword argument 'convert'
> Sending interrupt signal to process
> Terminated
> script returned exit code 143

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-10-03 15:49:27 +02:00
Sebastiaan van Stijn bc89de6047 Fix broken test due to BUSYBOX -> TEST_IMG rename
The BUSYBOX variable was renamed to TEST_IMG in
54b48a9b7a, however
0ddf428b6c got merged
after that change, but was out of date, and therefore
caused the tests to fail:

```
=================================== FAILURES ===================================
________ ServiceTest.test_create_service_with_network_attachment_config ________
tests/integration/api_service_test.py:379: in test_create_service_with_network_attachment_config
    container_spec = docker.types.ContainerSpec(BUSYBOX, ['true'])
E   NameError: global name 'BUSYBOX' is not defined
```

Fix the test by using the correct variable name.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-03 15:49:27 +02:00
Hannes Ljungberg 7c8264ce96 Correctly reference SecretReference
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-10-03 15:49:27 +02:00
Hannes Ljungberg ec63237da0 Correctly reference ConfigReference
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-10-03 15:49:27 +02:00
Hannes Ljungberg 934072a5e7 Add NetworkAttachmentConfig type
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-10-03 15:49:27 +02:00
Sebastiaan van Stijn 0be550dcf0 Jenkinsfile: update python 3.6 -> 3.7
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-03 15:49:27 +02:00
Sebastiaan van Stijn 38fe3983ba Jenkinsfile: update API version matrix; set default to v1.40
- Added new entry for Docker 19.03
- Removed obsolete engine versions that reached EOL (both
  as Community Edition and Enterprise Edition)
- Set the fallback/default API version to v1.40, which
  corresponds with Docker 19.03 (current release)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-03 15:49:27 +02:00
Frank Sachsenheim c88205c5ce Amends the docs concerning multiple label filters
Closes #2338

Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
2019-10-03 15:49:27 +02:00
Sebastiaan van Stijn 63760b1922 test/Dockerfile: allow using a mirror for the apt repository
With this change applied, the default debian package repository can be
replaced with a mirror;

```
make APT_MIRROR=cdn-fastly.deb.debian.org build-py3

...

Step 5/19 : RUN apt-get update && apt-get -y install     gnupg2     pass     curl
 ---> Running in 01c1101a0bd0
Get:1 http://cdn-fastly.deb.debian.org/debian buster InRelease [118 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian-security buster/updates InRelease [39.1 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [46.8 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian buster/main amd64 Packages [7897 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian-security buster/updates/main amd64 Packages [22.8 kB]
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-03 15:49:27 +02:00