Inject gating gating repo during image build

Currently we inject gating.repo on the built image.
In fs02, we first built the image and then inject
the gating repo on the image to pick up latest changes.

On FS02, the gating repo is not getting applied on the
built images.

In order to fix that, we are including the gating.repo
during the image build process and the latest packages
are getting pulled from gating repo.

It also removes install built repo operation as build
images role already takes care of that.

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I58ffeafddac3e14e265fc19f294f4508b8f7f5e9
This commit is contained in:
Chandan Kumar (raukadah) 2021-12-24 13:50:31 +05:30 committed by chandan kumar
parent 8ac5e54bca
commit c6bf40bc54
1 changed files with 13 additions and 16 deletions

View File

@ -26,6 +26,19 @@
path: "{{ images_working_dir }}/web-gating.repo"
register: new_repo
- name: Inject gating repo during image build process
when:
- new_repo.stat.exists
- to_build|bool
block:
- name: set facts for gating repo
set_fact:
gating_repo: "{{ images_working_dir }}/web-gating.repo"
- name: Append gating repo during image build
set_fact:
overcloud_repo_paths: "{{ overcloud_repo_paths + [ gating_repo ] }}"
- name: Run the image build script (direct) using oooci-build-images role
vars:
dib_yum_repo_conf: "{{ overcloud_repo_paths }}"
@ -39,22 +52,6 @@
- not build_image_isolated|bool
- to_build|bool
- when: new_repo.stat.exists
block:
- name: Enject repo in overcloud image
include_role:
name: install-built-repo
vars:
ib_repo_image_path: "{{ images_working_dir }}/{{ overcloud_image }}.qcow2"
- name: Enject repo in IPA image
include_role:
name: install-built-repo
vars:
ib_repo_image_path: "{{ images_working_dir }}/ironic-python-agent.initramfs"
initramfs_image: true
libguestfs_mode: false
- when: build_image_isolated|bool
block:
- name: Make sure /dev/pts exists