Fix docker CI. (#1494)

Backport of ansible-collections/community.docker#50 to stable-1.
This commit is contained in:
Felix Fontein 2020-12-15 20:20:43 +01:00 committed by GitHub
commit 6d4760eb20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 54 additions and 58 deletions

View file

@ -11,7 +11,7 @@
name: "{{ image }}"
source: pull
loop:
- "{{ docker_test_image_hello_world }}:latest"
- "{{ docker_test_image_hello_world }}"
- "{{ docker_test_image_alpine }}"
loop_control:
loop_var: image
@ -19,7 +19,7 @@
- name: Get image ID of {{ docker_test_image_hello_world }} and {{ docker_test_image_alpine }} images
docker_image_info:
name:
- "{{ docker_test_image_hello_world }}:latest"
- "{{ docker_test_image_hello_world }}"
- "{{ docker_test_image_alpine }}"
register: image_info
@ -103,25 +103,25 @@
- create_6.container.Image == image_info.images[1].Id
- create_6.container.Id == create_4.container.Id # make sure container wasn't recreated
- name: Create container with {{ docker_test_image_hello_world }} image via old digest
- name: Create container with {{ docker_test_image_digest_base }} image via old digest
docker_container:
image: "{{ docker_test_image_hello_world }}@sha256:{{ docker_test_image_hello_world_digest_v1 }}"
image: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}"
name: "{{ cname }}"
state: present
force_kill: yes
register: digest_1
- name: Create container with {{ docker_test_image_hello_world }} image via old digest (idempotent)
- name: Create container with {{ docker_test_image_digest_base }} image via old digest (idempotent)
docker_container:
image: "{{ docker_test_image_hello_world }}@sha256:{{ docker_test_image_hello_world_digest_v1 }}"
image: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v1 }}"
name: "{{ cname }}"
state: present
force_kill: yes
register: digest_2
- name: Update container with {{ docker_test_image_hello_world }} image via new digest
- name: Update container with {{ docker_test_image_digest_base }} image via new digest
docker_container:
image: "{{ docker_test_image_hello_world }}@sha256:{{ docker_test_image_hello_world_digest_v2 }}"
image: "{{ docker_test_image_digest_base }}@sha256:{{ docker_test_image_digest_v2 }}"
name: "{{ cname }}"
state: present
force_kill: yes

View file

@ -587,12 +587,6 @@
# of hello-world. We don't know why this happens, but it happens
# often enough to be annoying. That's why we disable this for now,
# and simply test that 'Output' is contained in the result.
# NOTE {{ docker_test_image_hello_world }} is no longer necessarily the
# hello-world image, so we potentially have a different output
# anyway. If someone wants to revive this test, it's probably best
# to keep {{ docker_test_image_hello_world }} as some image that
# has 'echo' and execute 'echo "Hello from Docker!"' or something
# like that.
- "'Output' in detach_no_cleanup.container"
# - "'Hello from Docker!' in detach_no_cleanup.container.Output"
- detach_no_cleanup_cleanup is changed