5464c4c413
Change-Id: I8ef9ae344e65d8c63b2cf72ec756960b65d44413
22 lines
688 B
YAML
22 lines
688 B
YAML
- name: Query Zuul API for image information
|
|
uri:
|
|
url: "{{ promote_container_image_api }}/builds?{{ promote_container_image_query }}"
|
|
register: build
|
|
|
|
- name: Parse build response
|
|
set_fact:
|
|
build: "{{ build.json[0] }}"
|
|
|
|
- name: Map image artifacts
|
|
set_fact:
|
|
zj_artifact_map: "{{ zj_artifact_map | default({}) | combine({zj_map_item.metadata.repository + ':' + zj_map_item.metadata.tag: zj_map_item.url}) }}"
|
|
loop_control:
|
|
loop_var: zj_map_item
|
|
loop: "{{ build | json_query(\"artifacts[?metadata.type=='container_image']\")}}"
|
|
|
|
- name: Promote image
|
|
loop: "{{ container_images }}"
|
|
loop_control:
|
|
loop_var: zj_image
|
|
include_tasks: promote-registry.yaml
|