Skip to content

Commit

Permalink
Return proper full hash for component repos
Browse files Browse the repository at this point in the history
In Component repos, we dump current-podified hash. We need the same hash
needs to be set during hash info set_fact. So the content provider this
hash to dependendent job otherwise it will fail.

Signed-off-by: Chandan Kumar <[email protected]>
  • Loading branch information
raukadah authored and openshift-merge-bot[bot] committed Aug 5, 2024
1 parent 08313f1 commit dee1f78
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions roles/repo_setup/tasks/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,22 @@

- name: Dump current-podified hash when using with component repo
when: cifmw_repo_setup_component_name | length > 0
ansible.builtin.get_url:
url: "{{ cifmw_repo_setup_dlrn_uri }}/{{ cifmw_repo_setup_os_release }}{{ cifmw_repo_setup_dist_major_version }}-{{ cifmw_repo_setup_branch }}/current-podified/delorean.repo.md5"
dest: "{{ cifmw_repo_setup_basedir }}/artifacts/repositories/delorean.repo.md5"
block:
- name: Dump current-podified hash
ansible.builtin.get_url:
url: "{{ cifmw_repo_setup_dlrn_uri }}/{{ cifmw_repo_setup_os_release }}{{ cifmw_repo_setup_dist_major_version }}-{{ cifmw_repo_setup_branch }}/current-podified/delorean.repo.md5"
dest: "{{ cifmw_repo_setup_basedir }}/artifacts/repositories/delorean.repo.md5"

- name: Slurp current podified hash
ansible.builtin.slurp:
src: "{{ cifmw_repo_setup_basedir }}/artifacts/repositories/delorean.repo.md5"
register: _current_podified_hash

- name: Update the value of full_hash
vars:
_hash: "{{ _current_podified_hash['content'] | b64decode | trim }}"
ansible.builtin.set_fact:
_repo_setup_json: "{{ _repo_setup_json | combine({'full_hash': _hash}, recursive=true) }}"

- name: Export hashes facts for further use
ansible.builtin.set_fact:
Expand Down

0 comments on commit dee1f78

Please sign in to comment.