From 0509a390acaddccf798951218f696235223b92ef Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Tue, 2 Apr 2019 16:21:33 -0700 Subject: [PATCH] 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 --- roles/pull-from-intermediate-registry/tasks/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/pull-from-intermediate-registry/tasks/main.yaml b/roles/pull-from-intermediate-registry/tasks/main.yaml index 2dc4334cb..ad6a1f33f 100644 --- a/roles/pull-from-intermediate-registry/tasks/main.yaml +++ b/roles/pull-from-intermediate-registry/tasks/main.yaml @@ -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