Load buildset registry data from zuul_return

The push-to-intermediate-registry role is meant to be used in the
post playbook of a job which most likely started the buildset
registry in its pre-playbook.  The buildset_registry variable
is returned to zuul and therefore available to child jobs, but
not to further playbooks in this job.  Therefore, load the variable
back in to memory here.

We may add this functionality directly to Zuul, in which case this
can be removed later.

Change-Id: I81899a9be92789fc1e5858f985eac41871b9d87a
This commit is contained in:
James E. Blair 2019-02-15 10:25:02 -08:00
parent 2a3d69c8be
commit 404ff1d97b
1 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,8 @@
# This can be removed if we add this functionality to Zuul directly
- name: Load information from zuul_return
when: buildset_registry is not defined
set_fact:
buildset_registry: "{{ (lookup('file', zuul.executor.work_root + '/results.json') | from_json)['buildset_registry'] }}"
- name: Push image to intermediate registry
include_tasks: push.yaml
loop: "{{ docker_images }}"