Load dlrn tag from disk and return with Zuul

Depends-On: https://review.opendev.org/#/c/756670
Change-Id: Ic0a3928c393b5aee49afa9d7a46cb92bedce0833
This commit is contained in:
Sagi Shnaidman 2020-10-08 13:07:25 +03:00
parent 49893a0222
commit bcc7aa3790
1 changed files with 20 additions and 1 deletions

View File

@ -26,12 +26,31 @@
registry_ip_address_branch: "{'{{ ci_branch }}': '{{ hostvars[groups.all[0]].ansible_host }}'}"
provider_dlrn_hash_branch: "{'{{ ci_branch }}': '{{ dlrn_hash|default('') }}'}"
- name: Check if DLRN tag was dumped in /tmp/container_build_id
stat:
path: /tmp/container_build_id
register: build_id
- name: Recover DLRN tag
when: build_id.stat.exists
block:
- name: Load file
slurp:
src: /tmp/container_build_id
register: dlrn_file
- name: Set fact for DLRN tag
set_fact:
dlrn_hash: "{{ dlrn_file['content'] | b64decode | trim }}"
dlrn_hash_tag: "{{ dlrn_file['content'] | b64decode | trim }}"
- name: Return Zuul data
debug:
msg: >-
Running podman registry and repository on
{{ hostvars[groups.all[0]].ansible_host | default('nowhere') }}
for branch {{ ci_branch }}
for branch {{ ci_branch }} and DLRN tag {{ dlrn_hash|default('no tag') }}
- name: Set registry IP address
zuul_return: