Commit Graph

3130 Commits

Author SHA1 Message Date
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 a5270865e6
Merge pull request #2578 from aiordache/fix_context_load_without_orch
Make context orchestrator field optional
2020-06-02 15:10:33 +02:00
aiordache 7133916798 add test for context load without orchestrator
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-06-02 10:50:03 +02:00
aiordache 1e11ecec34 Make orchestrator field optional
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-05-30 11:01:22 +02:00
Ulysses Souza 71adba9a1d
Merge pull request #2576 from ulyssessouza/fix-tls-host-protocol
Specify when to use `tls` on Context constructor
2020-05-28 21:37:24 +02:00
Ulysses Souza 3ce2d8959d Specify when to use `tls` on Context constructor
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-28 20:53:45 +02:00
Ville Skyttä 81eb5d42c9 Fix parameter names in TLSConfig error messages and comments
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2020-05-25 08:52:23 +03:00
Mike Haboustak df7bf5f5e0
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-04-30 05:27:45 -04:00
fengbaolong a07b5ee16c fix docker build error when dockerfile contains unicode character.
if dockerfile contains unicode character,len(contents) will return character length,this length will less than len(contents_encoded) length,so contants data will be truncated.

Signed-off-by: fengbaolong <fengbaolong@hotmail.com>
2020-04-28 20:01:59 +08:00
Ulysses Souza 9a24df5cdd
Merge pull request #2549 from wpjunior/fix-plugin-feedback
Fix tests to support both log plugin feedbacks
2020-04-22 10:30:02 +02:00
Wilson Júnior 7d92fbdee1
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-04-21 17:00:48 -03:00
Leo Hanisch dac038aca2 Fixes docker/docker-py#2533
Signed-off-by: Leo Hanisch <23164374+HaaLeo@users.noreply.github.com>
2020-03-20 12:40:58 +01:00
Niklas Saari 51fd6dd1ce
Disable compression by default when using get_archive method
Signed-off-by: Niklas Saari <niklas.saari@tutanota.com>
2020-02-26 23:09:38 +02:00
Ulysses Souza 030af62dca
Merge pull request #2514 from thaJeztah/remove_obsolete_versions
Jenkinsfile: remove obsolete engine versions
2020-02-21 16:17:07 +01:00
Ulysses Souza 12fe645aba
Merge pull request #2515 from thaJeztah/use_official_dind_images
Use official docker:dind image instead of custom image
2020-02-21 16:16:36 +01:00
Sebastiaan van Stijn 8ced47dca9
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-02-17 10:25:56 +01:00
Sebastiaan van Stijn da90bb3259
xfail "docker top" tests, and adjust for alpine image
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-17 10:25:53 +01:00
Sebastiaan van Stijn 7bef5e8676
Update test engine version to 19.03.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-15 00:00:48 +01:00
Sebastiaan van Stijn 789b6715ca
Jenkinsfile: remove obsolete engine versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-15 00:00:41 +01:00
Ulysses Souza a9867c9912
Merge pull request #2508 from ulyssessouza/update-release-4.2.0
Post release 4.2.0 update
2020-02-07 11:24:25 +01:00
Ulysses Souza 7c4194ce5d Post release 4.2.0 update:
- Changelog
- Next Version

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-02-07 01:00:18 +01: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
Ulysses Souza c6a33f25dc
Merge pull request #2495 from aiordache/issue#28_compose_context_target
Implement docker contexts
2020-02-05 15:30:48 +01:00
Anca Iordache 64fdb32ae8 Implement context management, lifecycle and unittests.
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2020-02-05 14:49:42 +01:00
Ulysses Souza f2e09ae632
Merge pull request #2485 from thaJeztah/fix_ImageCollectionTest_test_pull_multiple
Fix ImageCollectionTest.test_pull_multiple flakiness
2020-01-07 17:13:28 +01:00
Ulysses Souza 6010527ac6
Merge pull request #2444 from chris-crone/sync-release-4.1.0
Sync release 4.1.0
2020-01-07 17:12:50 +01:00
Sebastiaan van Stijn 940805dde6
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-01-06 13:46:23 +01:00
Djordje Lukic a0b9c3d0b3
Merge pull request #2421 from SLdragon/master
Fix win32pipe.WaitNamedPipe throw exception in windows container
2019-11-06 09:29:39 +01:00
Nicolas De Loof 1d8aa3019e Fix CI labels so we run on amd64 nodes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2019-10-16 14:31:50 +02:00
Till Riedel c285bee1bc obey Hostname Username Port and ProxyCommand settings from .ssh/config
Signed-off-by: Till Riedel <riedel@teco.edu>
2019-10-16 14:31:50 +02:00
Till Riedel eb8c78c3b3 set host key policy for ssh transport to WarningPolicy()
Signed-off-by: Till Riedel <riedel@teco.edu>
2019-10-16 14:31:50 +02:00
Till Riedel 2dc569a232 set logging level of paramiko to warn
Signed-off-by: Till Riedel <riedel@teco.edu>
2019-10-16 14:31:50 +02:00
Christopher Crone efc7e3c4b0 Version bump
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2019-10-03 16:40:23 +02:00
Christopher Crone c81200a483 Bump 4.1.0
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2019-10-03 16:39:40 +02: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