Browse Source

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
changes/45/637245/2
James E. Blair 3 months ago
parent
commit
404ff1d97b
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      roles/push-to-intermediate-registry/tasks/main.yaml

+ 5
- 0
roles/push-to-intermediate-registry/tasks/main.yaml View File

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

Loading…
Cancel
Save