Fix error in pull-from-intermediate-registry

A recent change to make this safer is causing the error:

The conditional check 'metadata in item and item.metadata.type | default('')
== 'container_image'' failed. The error was: error while evaluating conditional
(metadata in item and item.metadata.type | default('') == 'container_image'):
'metadata' is undefined

Change-Id: Ib709996dc950466a3673c422cd288ba874187f5c
This commit is contained in:
James E. Blair 2019-04-02 16:21:33 -07:00
parent 15cba72359
commit 0509a390ac

View File

@ -63,7 +63,7 @@
skopeo --insecure-policy copy
{{ item.url }}
docker://{{ buildset_registry.host }}:{{ buildset_registry.port }}/{{ item.metadata.repository }}:{{ item.metadata.tag }}
when: "metadata in item and item.metadata.type | default('') == 'container_image'"
when: "'metadata' in item and item.metadata.type | default('') == 'container_image'"
loop: "{{ zuul.artifacts | default([]) }}"
always:
- name: Remove docker user config