Run registry tests only when registry is present. (#729)

This commit is contained in:
Felix Fontein 2023-12-29 11:27:49 +01:00 committed by GitHub
parent b1dfe49e7d
commit 8ee0452776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,8 +9,8 @@
- name: Determining pushed image names - name: Determining pushed image names
set_fact: set_fact:
hello_world_image_base: "{{ registry_address }}/test/hello-world" hello_world_image_base: "{{ registry_address | default('localhost') }}/test/hello-world"
test_image_base: "{{ registry_address }}/test/{{ iname }}" test_image_base: "{{ registry_address | default('localhost') }}/test/{{ iname }}"
- name: Registering image name - name: Registering image name
set_fact: set_fact:
@ -20,6 +20,9 @@
## interact with test registry ##################################### ## interact with test registry #####################################
#################################################################### ####################################################################
- name: Run registry tests only when registry is present
when: registry_address is defined
block:
- name: Make sure image is not there - name: Make sure image is not there
docker_image: docker_image:
name: "{{ hello_world_image_base }}:latest" name: "{{ hello_world_image_base }}:latest"